File tree 6 files changed +10
-9
lines changed
FrameworkBundle/Tests/Functional
TwigBundle/Tests/Functional
Form/Tests/Extension/Validator/Type 6 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ return Symfony\CS\Config\Config::create()
6
6
->fixers (array (
7
7
'long_array_syntax ' ,
8
8
'php_unit_construct ' ,
9
+ 'php_unit_dedicate_assert ' ,
9
10
))
10
11
->finder (
11
12
Symfony \CS \Finder \DefaultFinder::create ()
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function testProfilerIsDisabled($insulate)
30
30
$ client ->enableProfiler ();
31
31
$ crawler = $ client ->request ('GET ' , '/profiler ' );
32
32
$ profile = $ client ->getProfile ();
33
- $ this ->assertTrue ( is_object ( $ profile) );
33
+ $ this ->assertInternalType ( ' object ' , $ profile );
34
34
35
35
$ client ->request ('GET ' , '/profiler ' );
36
36
$ this ->assertFalse ($ client ->getProfile ());
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable()
28
28
$ warmer ->enableOptionalWarmers ();
29
29
$ warmer ->warmUp ($ kernel ->getCacheDir ());
30
30
31
- $ this ->assertTrue ( file_exists ( $ kernel ->getCacheDir ().'/twig ' ) );
31
+ $ this ->assertFileExists ( $ kernel ->getCacheDir ().'/twig ' );
32
32
}
33
33
34
34
public function testCacheIsNotWarmedWhenTemplatingIsDisabled ()
@@ -40,7 +40,7 @@ public function testCacheIsNotWarmedWhenTemplatingIsDisabled()
40
40
$ warmer ->enableOptionalWarmers ();
41
41
$ warmer ->warmUp ($ kernel ->getCacheDir ());
42
42
43
- $ this ->assertFalse ( file_exists ( $ kernel ->getCacheDir ().'/twig ' ) );
43
+ $ this ->assertFileNotExists ( $ kernel ->getCacheDir ().'/twig ' );
44
44
}
45
45
46
46
protected function setUp ()
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public function testValidationGroupsCanBeSetToCallback()
58
58
'validation_groups ' => array ($ this , 'testValidationGroupsCanBeSetToCallback ' ),
59
59
));
60
60
61
- $ this ->assertTrue ( is_callable ( $ form ->getConfig ()->getOption ('validation_groups ' ) ));
61
+ $ this ->assertInternalType ( ' callable ' , $ form ->getConfig ()->getOption ('validation_groups ' ));
62
62
}
63
63
64
64
public function testValidationGroupsCanBeSetToClosure ()
@@ -67,7 +67,7 @@ public function testValidationGroupsCanBeSetToClosure()
67
67
'validation_groups ' => function (FormInterface $ form ) { },
68
68
));
69
69
70
- $ this ->assertTrue ( is_callable ( $ form ->getConfig ()->getOption ('validation_groups ' ) ));
70
+ $ this ->assertInternalType ( ' callable ' , $ form ->getConfig ()->getOption ('validation_groups ' ));
71
71
}
72
72
73
73
abstract protected function createForm (array $ options = array ());
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ public function testOverloadCannotBeEvaluatedLazilyWithoutExpectedClosureParams(
275
275
});
276
276
277
277
$ resolved = $ this ->options ->resolve ();
278
- $ this ->assertTrue ( is_callable ( $ resolved ['foo ' ]) );
278
+ $ this ->assertInternalType ( ' callable ' , $ resolved ['foo ' ]);
279
279
}
280
280
281
281
public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint ()
@@ -287,7 +287,7 @@ public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint()
287
287
});
288
288
289
289
$ resolved = $ this ->options ->resolve ();
290
- $ this ->assertTrue ( is_callable ( $ resolved ['foo ' ]) );
290
+ $ this ->assertInternalType ( ' callable ' , $ resolved ['foo ' ]);
291
291
}
292
292
293
293
public function testRemoveOptionAndNormalizer ()
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function testDumpBackupsFileIfExisting()
30
30
$ dumper = new ConcreteFileDumper ();
31
31
$ dumper ->dump ($ catalogue , array ('path ' => $ tempDir ));
32
32
33
- $ this ->assertTrue ( file_exists ( $ backupFile) );
33
+ $ this ->assertFileExists ( $ backupFile );
34
34
35
35
@unlink ($ file );
36
36
@unlink ($ backupFile );
@@ -49,7 +49,7 @@ public function testDumpCreatesNestedDirectoriesAndFile()
49
49
$ dumper ->setRelativePathTemplate ('test/translations/%domain%.%locale%.%extension% ' );
50
50
$ dumper ->dump ($ catalogue , array ('path ' => $ tempDir ));
51
51
52
- $ this ->assertTrue ( file_exists ( $ file) );
52
+ $ this ->assertFileExists ( $ file );
53
53
54
54
@unlink ($ file );
55
55
@rmdir ($ translationsDir );
You can’t perform that action at this time.
0 commit comments