Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b0df3a7

Browse filesBrowse files
committed
PHP CS Fixer: use php_unit_dedicate_assert
1 parent 287713f commit b0df3a7
Copy full SHA for b0df3a7

File tree

Expand file treeCollapse file tree

6 files changed

+10
-9
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+10
-9
lines changed

‎.php_cs

Copy file name to clipboardExpand all lines: .php_cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ return Symfony\CS\Config\Config::create()
66
->fixers(array(
77
'long_array_syntax',
88
'php_unit_construct',
9+
'php_unit_dedicate_assert',
910
))
1011
->finder(
1112
Symfony\CS\Finder\DefaultFinder::create()

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testProfilerIsDisabled($insulate)
3030
$client->enableProfiler();
3131
$crawler = $client->request('GET', '/profiler');
3232
$profile = $client->getProfile();
33-
$this->assertTrue(is_object($profile));
33+
$this->assertInternalType('object', $profile);
3434

3535
$client->request('GET', '/profiler');
3636
$this->assertFalse($client->getProfile());

‎src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable()
2828
$warmer->enableOptionalWarmers();
2929
$warmer->warmUp($kernel->getCacheDir());
3030

31-
$this->assertTrue(file_exists($kernel->getCacheDir().'/twig'));
31+
$this->assertFileExists($kernel->getCacheDir().'/twig');
3232
}
3333

3434
public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
@@ -40,7 +40,7 @@ public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
4040
$warmer->enableOptionalWarmers();
4141
$warmer->warmUp($kernel->getCacheDir());
4242

43-
$this->assertFalse(file_exists($kernel->getCacheDir().'/twig'));
43+
$this->assertFileNotExists($kernel->getCacheDir().'/twig');
4444
}
4545

4646
protected function setUp()

‎src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testValidationGroupsCanBeSetToCallback()
5858
'validation_groups' => array($this, 'testValidationGroupsCanBeSetToCallback'),
5959
));
6060

61-
$this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups')));
61+
$this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups'));
6262
}
6363

6464
public function testValidationGroupsCanBeSetToClosure()
@@ -67,7 +67,7 @@ public function testValidationGroupsCanBeSetToClosure()
6767
'validation_groups' => function (FormInterface $form) { },
6868
));
6969

70-
$this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups')));
70+
$this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups'));
7171
}
7272

7373
abstract protected function createForm(array $options = array());

‎src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function testOverloadCannotBeEvaluatedLazilyWithoutExpectedClosureParams(
275275
});
276276

277277
$resolved = $this->options->resolve();
278-
$this->assertTrue(is_callable($resolved['foo']));
278+
$this->assertInternalType('callable', $resolved['foo']);
279279
}
280280

281281
public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
@@ -287,7 +287,7 @@ public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
287287
});
288288

289289
$resolved = $this->options->resolve();
290-
$this->assertTrue(is_callable($resolved['foo']));
290+
$this->assertInternalType('callable', $resolved['foo']);
291291
}
292292

293293
public function testRemoveOptionAndNormalizer()

‎src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testDumpBackupsFileIfExisting()
3030
$dumper = new ConcreteFileDumper();
3131
$dumper->dump($catalogue, array('path' => $tempDir));
3232

33-
$this->assertTrue(file_exists($backupFile));
33+
$this->assertFileExists($backupFile);
3434

3535
@unlink($file);
3636
@unlink($backupFile);
@@ -49,7 +49,7 @@ public function testDumpCreatesNestedDirectoriesAndFile()
4949
$dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%');
5050
$dumper->dump($catalogue, array('path' => $tempDir));
5151

52-
$this->assertTrue(file_exists($file));
52+
$this->assertFileExists($file);
5353

5454
@unlink($file);
5555
@rmdir($translationsDir);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.