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 9124c28

Browse filesBrowse files
committed
minor #17872 [CS] PHPUnit dedicate assert fixer acceptance test (SpacePossum)
This PR was merged into the 2.3 branch. Discussion ---------- [CS] PHPUnit dedicate assert fixer acceptance test | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | License | MIT The goal of this PR is _not_ to have it merge, but to check with SF community if a new Fixer (PHP-CS-Fixer/PHP-CS-Fixer#1792) should be added to the set of Symfony fixers (at PHP-CS-Fixer). Commits ------- 7aff7f4 PhpUnitNoDedicateAssertFixer results
2 parents d8ad5a2 + 7aff7f4 commit 9124c28
Copy full SHA for 9124c28

File tree

Expand file treeCollapse file tree

9 files changed

+18
-18
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+18
-18
lines changed

‎src/Symfony/Bridge/Propel1/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Propel1/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ public function testTransform()
2727
{
2828
$result = $this->transformer->transform(new \PropelObjectCollection());
2929

30-
$this->assertTrue(is_array($result));
30+
$this->assertInternalType('array', $result);
3131
$this->assertCount(0, $result);
3232
}
3333

3434
public function testTransformWithNull()
3535
{
3636
$result = $this->transformer->transform(null);
3737

38-
$this->assertTrue(is_array($result));
38+
$this->assertInternalType('array', $result);
3939
$this->assertCount(0, $result);
4040
}
4141

@@ -54,7 +54,7 @@ public function testTransformWithData()
5454

5555
$result = $this->transformer->transform($coll);
5656

57-
$this->assertTrue(is_array($result));
57+
$this->assertInternalType('array', $result);
5858
$this->assertCount(2, $result);
5959
$this->assertEquals('foo', $result[0]);
6060
$this->assertEquals('bar', $result[1]);
@@ -93,7 +93,7 @@ public function testReverseTransformWithData()
9393

9494
$this->assertInstanceOf('\PropelObjectCollection', $result);
9595

96-
$this->assertTrue(is_array($data));
96+
$this->assertInternalType('array', $data);
9797
$this->assertCount(2, $data);
9898
$this->assertEquals('foo', $data[0]);
9999
$this->assertEquals('bar', $data[1]);

‎src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function testDefinitionExampleGetsTransferredToNode()
120120
$tree = $builder->buildTree();
121121
$children = $tree->getChildren();
122122

123-
$this->assertTrue(is_array($tree->getExample()));
123+
$this->assertInternalType('array', $tree->getExample());
124124
$this->assertEquals('example', $children['child']->getExample());
125125
}
126126
}

‎src/Symfony/Component/Finder/Tests/Shell/CommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Finder/Tests/Shell/CommandTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function testExecute()
146146
$cmd->add('--version');
147147
$result = $cmd->execute();
148148

149-
$this->assertTrue(is_array($result));
149+
$this->assertInternalType('array', $result);
150150
$this->assertNotEmpty($result);
151151
$this->assertRegexp('/PHP|HipHop/', $result[0]);
152152
}

‎src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public function testMove()
8181
$movedFile = $file->move($targetDir);
8282
$this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
8383

84-
$this->assertTrue(file_exists($targetPath));
85-
$this->assertFalse(file_exists($path));
84+
$this->assertFileExists($targetPath);
85+
$this->assertFileNotExists($path);
8686
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
8787

8888
@unlink($targetPath);
@@ -100,8 +100,8 @@ public function testMoveWithNewName()
100100
$file = new File($path);
101101
$movedFile = $file->move($targetDir, 'test.newname.gif');
102102

103-
$this->assertTrue(file_exists($targetPath));
104-
$this->assertFalse(file_exists($path));
103+
$this->assertFileExists($targetPath);
104+
$this->assertFileNotExists($path);
105105
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
106106

107107
@unlink($targetPath);
@@ -135,8 +135,8 @@ public function testMoveWithNonLatinName($filename, $sanitizedFilename)
135135
$movedFile = $file->move($targetDir, $filename);
136136
$this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
137137

138-
$this->assertTrue(file_exists($targetPath));
139-
$this->assertFalse(file_exists($path));
138+
$this->assertFileExists($targetPath);
139+
$this->assertFileNotExists($path);
140140
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
141141

142142
@unlink($targetPath);

‎src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ public function testMoveLocalFileIsAllowedInTestMode()
164164

165165
$movedFile = $file->move(__DIR__.'/Fixtures/directory');
166166

167-
$this->assertTrue(file_exists($targetPath));
168-
$this->assertFalse(file_exists($path));
167+
$this->assertFileExists($targetPath);
168+
$this->assertFileNotExists($path);
169169
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
170170

171171
@unlink($targetPath);

‎src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testWriteCacheFileCreatesTheFile()
3232
$warmer = new TestCacheWarmer(self::$cacheFile);
3333
$warmer->warmUp(dirname(self::$cacheFile));
3434

35-
$this->assertTrue(file_exists(self::$cacheFile));
35+
$this->assertFileExists(self::$cacheFile);
3636
}
3737

3838
/**

‎src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testReadReturnsArray()
3232
{
3333
$data = $this->reader->read(__DIR__.'/Fixtures/json', 'en');
3434

35-
$this->assertTrue(is_array($data));
35+
$this->assertInternalType('array', $data);
3636
$this->assertSame('Bar', $data['Foo']);
3737
$this->assertFalse(isset($data['ExistsNot']));
3838
}

‎src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testReadReturnsArray()
3232
{
3333
$data = $this->reader->read(__DIR__.'/Fixtures/php', 'en');
3434

35-
$this->assertTrue(is_array($data));
35+
$this->assertInternalType('array', $data);
3636
$this->assertSame('Bar', $data['Foo']);
3737
$this->assertFalse(isset($data['ExistsNot']));
3838
}

‎src/Symfony/Component/Security/Tests/Core/SecurityContextTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Tests/Core/SecurityContextTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ public function testGetSetToken()
9292

9393
public function testTranslationsAreNotInCore()
9494
{
95-
$this->assertFalse(file_exists(__DIR__.'/../../Core/Resources/translations/'));
95+
$this->assertFileNotExists(__DIR__.'/../../Core/Resources/translations/');
9696
}
9797
}

0 commit comments

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