PHP CS Fixer: use php_unit_dedicate_assert

This commit is contained in:
Dariusz Ruminski 2016-10-16 22:09:25 +02:00
parent 287713fd6a
commit b0df3a7eb9
6 changed files with 10 additions and 9 deletions

View File

@ -6,6 +6,7 @@ return Symfony\CS\Config\Config::create()
->fixers(array(
'long_array_syntax',
'php_unit_construct',
'php_unit_dedicate_assert',
))
->finder(
Symfony\CS\Finder\DefaultFinder::create()

View File

@ -30,7 +30,7 @@ class ProfilerTest extends WebTestCase
$client->enableProfiler();
$crawler = $client->request('GET', '/profiler');
$profile = $client->getProfile();
$this->assertTrue(is_object($profile));
$this->assertInternalType('object', $profile);
$client->request('GET', '/profiler');
$this->assertFalse($client->getProfile());

View File

@ -28,7 +28,7 @@ class NewCacheWamingTest extends \PHPUnit_Framework_TestCase
$warmer->enableOptionalWarmers();
$warmer->warmUp($kernel->getCacheDir());
$this->assertTrue(file_exists($kernel->getCacheDir().'/twig'));
$this->assertFileExists($kernel->getCacheDir().'/twig');
}
public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
@ -40,7 +40,7 @@ class NewCacheWamingTest extends \PHPUnit_Framework_TestCase
$warmer->enableOptionalWarmers();
$warmer->warmUp($kernel->getCacheDir());
$this->assertFalse(file_exists($kernel->getCacheDir().'/twig'));
$this->assertFileNotExists($kernel->getCacheDir().'/twig');
}
protected function setUp()

View File

@ -58,7 +58,7 @@ abstract class BaseValidatorExtensionTest extends TypeTestCase
'validation_groups' => array($this, 'testValidationGroupsCanBeSetToCallback'),
));
$this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups')));
$this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups'));
}
public function testValidationGroupsCanBeSetToClosure()
@ -67,7 +67,7 @@ abstract class BaseValidatorExtensionTest extends TypeTestCase
'validation_groups' => function (FormInterface $form) { },
));
$this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups')));
$this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups'));
}
abstract protected function createForm(array $options = array());

View File

@ -275,7 +275,7 @@ class LegacyOptionsTest extends \PHPUnit_Framework_TestCase
});
$resolved = $this->options->resolve();
$this->assertTrue(is_callable($resolved['foo']));
$this->assertInternalType('callable', $resolved['foo']);
}
public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
@ -287,7 +287,7 @@ class LegacyOptionsTest extends \PHPUnit_Framework_TestCase
});
$resolved = $this->options->resolve();
$this->assertTrue(is_callable($resolved['foo']));
$this->assertInternalType('callable', $resolved['foo']);
}
public function testRemoveOptionAndNormalizer()

View File

@ -30,7 +30,7 @@ class FileDumperTest extends \PHPUnit_Framework_TestCase
$dumper = new ConcreteFileDumper();
$dumper->dump($catalogue, array('path' => $tempDir));
$this->assertTrue(file_exists($backupFile));
$this->assertFileExists($backupFile);
@unlink($file);
@unlink($backupFile);
@ -49,7 +49,7 @@ class FileDumperTest extends \PHPUnit_Framework_TestCase
$dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%');
$dumper->dump($catalogue, array('path' => $tempDir));
$this->assertTrue(file_exists($file));
$this->assertFileExists($file);
@unlink($file);
@rmdir($translationsDir);