Browse Source

Fix tests.

mscherer 6 years ago
parent
commit
981ebe9889

+ 1 - 1
src/Utility/Utility.php

@@ -288,7 +288,7 @@ class Utility {
 	/**
 	 * Parse headers from a specific URL content.
 	 *
-	 * @param string $urlArray
+	 * @param string $url
 	 *
 	 * @return mixed array of headers or FALSE on failure
 	 */

+ 1 - 1
tests/TestCase/Controller/Component/UrlComponentTest.php

@@ -6,9 +6,9 @@ use App\Controller\UrlComponentTestController;
 use Cake\Core\Configure;
 use Cake\Event\Event;
 use Cake\Http\ServerRequest;
-use Cake\Routing\Route\DashedRoute;
 use Cake\Routing\RouteBuilder;
 use Cake\Routing\Router;
+use Cake\Routing\Route\DashedRoute;
 use Tools\TestSuite\TestCase;
 
 class UrlComponentTest extends TestCase {

+ 4 - 2
tests/TestCase/Model/Table/TableTest.php

@@ -208,8 +208,10 @@ class TableTest extends TestCase {
 		$this->assertEquals($expected, Hash::extract($results, '{n}.title'));
 		*/
 
-		$expected = [3, 1];
-		$this->assertEquals($expected, Hash::extract($results, '{n}.author_id'));
+		$ids = Hash::extract($results, '{n}.author_id');
+		sort($ids);
+		$expected = [1, 3];
+		$this->assertEquals($expected, $ids);
 	}
 
 	/**

+ 0 - 1
tests/phpstan.neon

@@ -6,7 +6,6 @@ parameters:
 		- %rootDir%/../../../src/View/Helper/TreeHelper
 		- %rootDir%/../../../src/Utility/Mime
 	ignoreErrors:
-		- '#Access to an undefined property .+Table::\$belongsTo#'
 		- '#Call to an undefined method .+TimeHelper::.+\(\)#'
 		- '#Access to protected property .+ServerRequest::\$.+#'
 		- '#Return type \(bool\) of method .+Email::send\(\) should be compatible with return type \(array\) of method .+Email::send\(\)#'