PHP CS Fixer: use php_unit_dedicate_assert
This commit is contained in:
parent
287713fd6a
commit
b0df3a7eb9
1
.php_cs
1
.php_cs
@ -6,6 +6,7 @@ return Symfony\CS\Config\Config::create()
|
|||||||
->fixers(array(
|
->fixers(array(
|
||||||
'long_array_syntax',
|
'long_array_syntax',
|
||||||
'php_unit_construct',
|
'php_unit_construct',
|
||||||
|
'php_unit_dedicate_assert',
|
||||||
))
|
))
|
||||||
->finder(
|
->finder(
|
||||||
Symfony\CS\Finder\DefaultFinder::create()
|
Symfony\CS\Finder\DefaultFinder::create()
|
||||||
|
@ -30,7 +30,7 @@ class ProfilerTest extends WebTestCase
|
|||||||
$client->enableProfiler();
|
$client->enableProfiler();
|
||||||
$crawler = $client->request('GET', '/profiler');
|
$crawler = $client->request('GET', '/profiler');
|
||||||
$profile = $client->getProfile();
|
$profile = $client->getProfile();
|
||||||
$this->assertTrue(is_object($profile));
|
$this->assertInternalType('object', $profile);
|
||||||
|
|
||||||
$client->request('GET', '/profiler');
|
$client->request('GET', '/profiler');
|
||||||
$this->assertFalse($client->getProfile());
|
$this->assertFalse($client->getProfile());
|
||||||
|
@ -28,7 +28,7 @@ class NewCacheWamingTest extends \PHPUnit_Framework_TestCase
|
|||||||
$warmer->enableOptionalWarmers();
|
$warmer->enableOptionalWarmers();
|
||||||
$warmer->warmUp($kernel->getCacheDir());
|
$warmer->warmUp($kernel->getCacheDir());
|
||||||
|
|
||||||
$this->assertTrue(file_exists($kernel->getCacheDir().'/twig'));
|
$this->assertFileExists($kernel->getCacheDir().'/twig');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
|
public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
|
||||||
@ -40,7 +40,7 @@ class NewCacheWamingTest extends \PHPUnit_Framework_TestCase
|
|||||||
$warmer->enableOptionalWarmers();
|
$warmer->enableOptionalWarmers();
|
||||||
$warmer->warmUp($kernel->getCacheDir());
|
$warmer->warmUp($kernel->getCacheDir());
|
||||||
|
|
||||||
$this->assertFalse(file_exists($kernel->getCacheDir().'/twig'));
|
$this->assertFileNotExists($kernel->getCacheDir().'/twig');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
|
@ -58,7 +58,7 @@ abstract class BaseValidatorExtensionTest extends TypeTestCase
|
|||||||
'validation_groups' => array($this, 'testValidationGroupsCanBeSetToCallback'),
|
'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()
|
public function testValidationGroupsCanBeSetToClosure()
|
||||||
@ -67,7 +67,7 @@ abstract class BaseValidatorExtensionTest extends TypeTestCase
|
|||||||
'validation_groups' => function (FormInterface $form) { },
|
'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());
|
abstract protected function createForm(array $options = array());
|
||||||
|
@ -275,7 +275,7 @@ class LegacyOptionsTest extends \PHPUnit_Framework_TestCase
|
|||||||
});
|
});
|
||||||
|
|
||||||
$resolved = $this->options->resolve();
|
$resolved = $this->options->resolve();
|
||||||
$this->assertTrue(is_callable($resolved['foo']));
|
$this->assertInternalType('callable', $resolved['foo']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
|
public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
|
||||||
@ -287,7 +287,7 @@ class LegacyOptionsTest extends \PHPUnit_Framework_TestCase
|
|||||||
});
|
});
|
||||||
|
|
||||||
$resolved = $this->options->resolve();
|
$resolved = $this->options->resolve();
|
||||||
$this->assertTrue(is_callable($resolved['foo']));
|
$this->assertInternalType('callable', $resolved['foo']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRemoveOptionAndNormalizer()
|
public function testRemoveOptionAndNormalizer()
|
||||||
|
@ -30,7 +30,7 @@ class FileDumperTest extends \PHPUnit_Framework_TestCase
|
|||||||
$dumper = new ConcreteFileDumper();
|
$dumper = new ConcreteFileDumper();
|
||||||
$dumper->dump($catalogue, array('path' => $tempDir));
|
$dumper->dump($catalogue, array('path' => $tempDir));
|
||||||
|
|
||||||
$this->assertTrue(file_exists($backupFile));
|
$this->assertFileExists($backupFile);
|
||||||
|
|
||||||
@unlink($file);
|
@unlink($file);
|
||||||
@unlink($backupFile);
|
@unlink($backupFile);
|
||||||
@ -49,7 +49,7 @@ class FileDumperTest extends \PHPUnit_Framework_TestCase
|
|||||||
$dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%');
|
$dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%');
|
||||||
$dumper->dump($catalogue, array('path' => $tempDir));
|
$dumper->dump($catalogue, array('path' => $tempDir));
|
||||||
|
|
||||||
$this->assertTrue(file_exists($file));
|
$this->assertFileExists($file);
|
||||||
|
|
||||||
@unlink($file);
|
@unlink($file);
|
||||||
@rmdir($translationsDir);
|
@rmdir($translationsDir);
|
||||||
|
Reference in New Issue
Block a user