PhpUnitNoDedicateAssertFixer results

This commit is contained in:
SpacePossum 2016-02-21 12:34:19 +01:00
parent d8ad5a2cd4
commit 7aff7f42c1
9 changed files with 18 additions and 18 deletions

View File

@ -27,7 +27,7 @@ class CollectionToArrayTransformerTest extends Propel1TestCase
{ {
$result = $this->transformer->transform(new \PropelObjectCollection()); $result = $this->transformer->transform(new \PropelObjectCollection());
$this->assertTrue(is_array($result)); $this->assertInternalType('array', $result);
$this->assertCount(0, $result); $this->assertCount(0, $result);
} }
@ -35,7 +35,7 @@ class CollectionToArrayTransformerTest extends Propel1TestCase
{ {
$result = $this->transformer->transform(null); $result = $this->transformer->transform(null);
$this->assertTrue(is_array($result)); $this->assertInternalType('array', $result);
$this->assertCount(0, $result); $this->assertCount(0, $result);
} }
@ -54,7 +54,7 @@ class CollectionToArrayTransformerTest extends Propel1TestCase
$result = $this->transformer->transform($coll); $result = $this->transformer->transform($coll);
$this->assertTrue(is_array($result)); $this->assertInternalType('array', $result);
$this->assertCount(2, $result); $this->assertCount(2, $result);
$this->assertEquals('foo', $result[0]); $this->assertEquals('foo', $result[0]);
$this->assertEquals('bar', $result[1]); $this->assertEquals('bar', $result[1]);
@ -93,7 +93,7 @@ class CollectionToArrayTransformerTest extends Propel1TestCase
$this->assertInstanceOf('\PropelObjectCollection', $result); $this->assertInstanceOf('\PropelObjectCollection', $result);
$this->assertTrue(is_array($data)); $this->assertInternalType('array', $data);
$this->assertCount(2, $data); $this->assertCount(2, $data);
$this->assertEquals('foo', $data[0]); $this->assertEquals('foo', $data[0]);
$this->assertEquals('bar', $data[1]); $this->assertEquals('bar', $data[1]);

View File

@ -120,7 +120,7 @@ class TreeBuilderTest extends \PHPUnit_Framework_TestCase
$tree = $builder->buildTree(); $tree = $builder->buildTree();
$children = $tree->getChildren(); $children = $tree->getChildren();
$this->assertTrue(is_array($tree->getExample())); $this->assertInternalType('array', $tree->getExample());
$this->assertEquals('example', $children['child']->getExample()); $this->assertEquals('example', $children['child']->getExample());
} }
} }

View File

@ -146,7 +146,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
$cmd->add('--version'); $cmd->add('--version');
$result = $cmd->execute(); $result = $cmd->execute();
$this->assertTrue(is_array($result)); $this->assertInternalType('array', $result);
$this->assertNotEmpty($result); $this->assertNotEmpty($result);
$this->assertRegexp('/PHP|HipHop/', $result[0]); $this->assertRegexp('/PHP|HipHop/', $result[0]);
} }

View File

@ -81,8 +81,8 @@ class FileTest extends \PHPUnit_Framework_TestCase
$movedFile = $file->move($targetDir); $movedFile = $file->move($targetDir);
$this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile); $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
$this->assertTrue(file_exists($targetPath)); $this->assertFileExists($targetPath);
$this->assertFalse(file_exists($path)); $this->assertFileNotExists($path);
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
@unlink($targetPath); @unlink($targetPath);
@ -100,8 +100,8 @@ class FileTest extends \PHPUnit_Framework_TestCase
$file = new File($path); $file = new File($path);
$movedFile = $file->move($targetDir, 'test.newname.gif'); $movedFile = $file->move($targetDir, 'test.newname.gif');
$this->assertTrue(file_exists($targetPath)); $this->assertFileExists($targetPath);
$this->assertFalse(file_exists($path)); $this->assertFileNotExists($path);
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
@unlink($targetPath); @unlink($targetPath);
@ -135,8 +135,8 @@ class FileTest extends \PHPUnit_Framework_TestCase
$movedFile = $file->move($targetDir, $filename); $movedFile = $file->move($targetDir, $filename);
$this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile); $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
$this->assertTrue(file_exists($targetPath)); $this->assertFileExists($targetPath);
$this->assertFalse(file_exists($path)); $this->assertFileNotExists($path);
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
@unlink($targetPath); @unlink($targetPath);

View File

@ -164,8 +164,8 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase
$movedFile = $file->move(__DIR__.'/Fixtures/directory'); $movedFile = $file->move(__DIR__.'/Fixtures/directory');
$this->assertTrue(file_exists($targetPath)); $this->assertFileExists($targetPath);
$this->assertFalse(file_exists($path)); $this->assertFileNotExists($path);
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
@unlink($targetPath); @unlink($targetPath);

View File

@ -32,7 +32,7 @@ class CacheWarmerTest extends \PHPUnit_Framework_TestCase
$warmer = new TestCacheWarmer(self::$cacheFile); $warmer = new TestCacheWarmer(self::$cacheFile);
$warmer->warmUp(dirname(self::$cacheFile)); $warmer->warmUp(dirname(self::$cacheFile));
$this->assertTrue(file_exists(self::$cacheFile)); $this->assertFileExists(self::$cacheFile);
} }
/** /**

View File

@ -32,7 +32,7 @@ class JsonBundleReaderTest extends \PHPUnit_Framework_TestCase
{ {
$data = $this->reader->read(__DIR__.'/Fixtures/json', 'en'); $data = $this->reader->read(__DIR__.'/Fixtures/json', 'en');
$this->assertTrue(is_array($data)); $this->assertInternalType('array', $data);
$this->assertSame('Bar', $data['Foo']); $this->assertSame('Bar', $data['Foo']);
$this->assertFalse(isset($data['ExistsNot'])); $this->assertFalse(isset($data['ExistsNot']));
} }

View File

@ -32,7 +32,7 @@ class PhpBundleReaderTest extends \PHPUnit_Framework_TestCase
{ {
$data = $this->reader->read(__DIR__.'/Fixtures/php', 'en'); $data = $this->reader->read(__DIR__.'/Fixtures/php', 'en');
$this->assertTrue(is_array($data)); $this->assertInternalType('array', $data);
$this->assertSame('Bar', $data['Foo']); $this->assertSame('Bar', $data['Foo']);
$this->assertFalse(isset($data['ExistsNot'])); $this->assertFalse(isset($data['ExistsNot']));
} }

View File

@ -92,6 +92,6 @@ class SecurityContextTest extends \PHPUnit_Framework_TestCase
public function testTranslationsAreNotInCore() public function testTranslationsAreNotInCore()
{ {
$this->assertFalse(file_exists(__DIR__.'/../../Core/Resources/translations/')); $this->assertFileNotExists(__DIR__.'/../../Core/Resources/translations/');
} }
} }