From f6ec94364c743e1247c318daeb6d72a3280b676b Mon Sep 17 00:00:00 2001 From: Pavel Batanov Date: Tue, 7 Aug 2018 14:41:23 +0300 Subject: [PATCH] Allow static assert calls --- Test/WebTestCase.php | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Test/WebTestCase.php b/Test/WebTestCase.php index ab870f02..55af1f03 100644 --- a/Test/WebTestCase.php +++ b/Test/WebTestCase.php @@ -76,6 +76,31 @@ abstract class WebTestCase extends BaseWebTestCase */ private static $cachedMetadatas = []; + /** + * Asserts that the HTTP response code of the last request performed by + * $client matches the expected code. If not, raises an error with more + * information. + * + * @param $expectedStatusCode + * @param Client $client + */ + public static function assertStatusCode($expectedStatusCode, Client $client) + { + HttpAssertions::assertStatusCode($expectedStatusCode, $client); + } + + /** + * Assert that the last validation errors within $container match the + * expected keys. + * + * @param array $expected A flat array of field names + * @param ContainerInterface $container + */ + public static function assertValidationErrors(array $expected, ContainerInterface $container) + { + HttpAssertions::assertValidationErrors($expected, $container); + } + protected static function getKernelClass() { $dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : static::getPhpUnitXmlDir(); @@ -918,31 +943,6 @@ public function loginAs(UserInterface $user, $firewallName) return $this; } - /** - * Asserts that the HTTP response code of the last request performed by - * $client matches the expected code. If not, raises an error with more - * information. - * - * @param $expectedStatusCode - * @param Client $client - */ - public function assertStatusCode($expectedStatusCode, Client $client) - { - HttpAssertions::assertStatusCode($expectedStatusCode, $client); - } - - /** - * Assert that the last validation errors within $container match the - * expected keys. - * - * @param array $expected A flat array of field names - * @param ContainerInterface $container - */ - public function assertValidationErrors(array $expected, ContainerInterface $container) - { - HttpAssertions::assertValidationErrors($expected, $container); - } - /** * @param array $excludedDoctrineTables */