Skip to content

Commit 08eef57

Browse files
authored
Merge pull request #834 from dunglas/fix_tests
Fix exception check in tests
2 parents cf3f132 + 303efc0 commit 08eef57

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

tests/Api/ResourceClassResolverTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testGetResourceClassWithNoClassName()
4848
}
4949

5050
/**
51-
* @expectedException \InvalidArgumentException
51+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
5252
* @expectedExceptionMessage No resource class found
5353
*/
5454
public function testGetResourceClassWithWrongClassName()
@@ -61,7 +61,7 @@ public function testGetResourceClassWithWrongClassName()
6161
}
6262

6363
/**
64-
* @expectedException \InvalidArgumentException
64+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
6565
* @expectedExceptionMessage No resource class found for object of type "ArrayIterator"
6666
*/
6767
public function testGetResourceClassWithNoResourceClassName()
@@ -96,7 +96,7 @@ public function testIsResourceClassWithWrongClassName()
9696
}
9797

9898
/**
99-
* @expectedException \InvalidArgumentException
99+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
100100
* @expectedExceptionMessage No resource class found.
101101
*/
102102
public function testGetResourceClassWithNoResourceClassNameAndNoObject()

tests/Bridge/Doctrine/Orm/Extension/EagerLoadingExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function testDenormalizeItemWithExistingGroups()
274274
}
275275

276276
/**
277-
* @expectedException \RuntimeException
277+
* @expectedException \ApiPlatform\Core\Exception\RuntimeException
278278
* @expectedExceptionMessage The total number of joined relations has exceeded the specified maximum. Raise the limit if necessary.
279279
*/
280280
public function testMaxDepthReached()

tests/Bridge/Symfony/Bundle/DependencyInjection/Compiler/FilterPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testProcess()
4141
}
4242

4343
/**
44-
* @expectedException \RuntimeException
44+
* @expectedException \ApiPlatform\Core\Exception\RuntimeException
4545
* @expectedExceptionMessage Filter tags must have an "id" property.
4646
*/
4747
public function testIdNotExist()

tests/Bridge/Symfony/Routing/CachedRouteNameResolverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testConstruct()
3535
}
3636

3737
/**
38-
* @expectedException \InvalidArgumentException
38+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
3939
* @expectedExceptionMessage No item route associated with the type "AppBundle\Entity\User".
4040
*/
4141
public function testGetRouteNameForItemRouteWithNoMatchingRoute()
@@ -95,7 +95,7 @@ public function testGetRouteNameForItemRouteOnCacheHit()
9595
}
9696

9797
/**
98-
* @expectedException \InvalidArgumentException
98+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
9999
* @expectedExceptionMessage No collection route associated with the type "AppBundle\Entity\User".
100100
*/
101101
public function testGetRouteNameForCollectionRouteWithNoMatchingRoute()

tests/Bridge/Symfony/Routing/IriConverterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
class IriConverterTest extends \PHPUnit_Framework_TestCase
2626
{
2727
/**
28-
* @expectedException \InvalidArgumentException
28+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
2929
* @expectedExceptionMessage No route matches "/users/3".
3030
*/
3131
public function testGetItemFromIriNoRouteException()
@@ -52,7 +52,7 @@ public function testGetItemFromIriNoRouteException()
5252
}
5353

5454
/**
55-
* @expectedException \InvalidArgumentException
55+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
5656
* @expectedExceptionMessage No resource associated to "/users/3".
5757
*/
5858
public function testGetItemFromIriNoResourceException()
@@ -79,7 +79,7 @@ public function testGetItemFromIriNoResourceException()
7979
}
8080

8181
/**
82-
* @expectedException \InvalidArgumentException
82+
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
8383
* @expectedExceptionMessage Item not found for "/users/3".
8484
*/
8585
public function testGetItemFromIriItemNotFoundException()

0 commit comments

Comments
 (0)