Skip to content

Commit

Permalink
PHP CS Fixer: use php_unit_dedicate_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Oct 16, 2016
1 parent 287713f commit b0df3a7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .php_cs
Expand Up @@ -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()
Expand Down
Expand Up @@ -30,7 +30,7 @@ public function testProfilerIsDisabled($insulate)
$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());
Expand Down
Expand Up @@ -28,7 +28,7 @@ public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable()
$warmer->enableOptionalWarmers();
$warmer->warmUp($kernel->getCacheDir());

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

public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
Expand All @@ -40,7 +40,7 @@ public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
$warmer->enableOptionalWarmers();
$warmer->warmUp($kernel->getCacheDir());

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

protected function setUp()
Expand Down
Expand Up @@ -58,7 +58,7 @@ public function 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()
Expand All @@ -67,7 +67,7 @@ public function testValidationGroupsCanBeSetToClosure()
'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());
Expand Down
Expand Up @@ -275,7 +275,7 @@ public function testOverloadCannotBeEvaluatedLazilyWithoutExpectedClosureParams(
});

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

public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
Expand All @@ -287,7 +287,7 @@ public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
});

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

public function testRemoveOptionAndNormalizer()
Expand Down
Expand Up @@ -30,7 +30,7 @@ public function testDumpBackupsFileIfExisting()
$dumper = new ConcreteFileDumper();
$dumper->dump($catalogue, array('path' => $tempDir));

$this->assertTrue(file_exists($backupFile));
$this->assertFileExists($backupFile);

@unlink($file);
@unlink($backupFile);
Expand All @@ -49,7 +49,7 @@ public function testDumpCreatesNestedDirectoriesAndFile()
$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);
Expand Down

0 comments on commit b0df3a7

Please sign in to comment.