Browse Source

Merge pull request #3821 from cakephp/3.0-tests-win

3.0 tests win
Mark Story 11 years ago
parent
commit
1f5d7ad4b7

+ 2 - 1
appveyor.yml

@@ -37,6 +37,7 @@ install:
   - echo extension=php_pdo_mysql.dll >> php.ini
   - echo extension=php_intl.dll >> php.ini
   - echo extension=php_mbstring.dll >> php.ini
+  - echo extension=php_fileinfo.dll >> php.ini
   - cd C:\projects\cakephp
   - php -r "readfile('https://getcomposer.org/installer');" | php
   - php composer.phar install
@@ -44,4 +45,4 @@ test_script:
   - sqlcmd -S ".\SQL2008R2SP2" -U sa -P Password12! -Q "create database cakephp;"
   - sqlcmd -S ".\SQL2012SP1" -U sa -P Password12! -Q "create database cakephp;"
   - cd C:\projects\cakephp
-  - vendor\bin\phpunit.bat tests\TestCase\DatabaseSuite
+  - vendor\bin\phpunit.bat

+ 3 - 3
tests/TestCase/Database/Schema/MysqlSchemaTest.php

@@ -723,7 +723,7 @@ PRIMARY KEY (`id`)
 SQL;
 		$result = $table->createSql($connection);
 		$this->assertCount(1, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 	}
 
 /**
@@ -779,7 +779,7 @@ PRIMARY KEY (`article_id`, `tag_id`)
 SQL;
 		$result = $table->createSql($connection);
 		$this->assertCount(1, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 
 		$table = (new Table('composite_key'))
 			->addColumn('id', [
@@ -805,7 +805,7 @@ PRIMARY KEY (`id`, `account_id`)
 SQL;
 		$result = $table->createSql($connection);
 		$this->assertCount(1, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 	}
 
 /**

+ 4 - 4
tests/TestCase/Database/Schema/PostgresSchemaTest.php

@@ -646,7 +646,7 @@ SQL;
 			'type' => 'integer',
 		])->addConstraint($name, $data);
 
-		$this->assertEquals($expected, $schema->constraintSql($table, $name));
+		$this->assertTextEquals($expected, $schema->constraintSql($table, $name));
 	}
 
 /**
@@ -692,7 +692,7 @@ SQL;
 		$result = $table->createSql($connection);
 
 		$this->assertCount(3, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 		$this->assertEquals(
 			'CREATE INDEX "title_idx" ON "schema_articles" ("title")',
 			$result[1]
@@ -756,7 +756,7 @@ PRIMARY KEY ("article_id", "tag_id")
 SQL;
 		$result = $table->createSql($connection);
 		$this->assertCount(1, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 
 		$table = (new Table('composite_key'))
 			->addColumn('id', [
@@ -782,7 +782,7 @@ PRIMARY KEY ("id", "account_id")
 SQL;
 		$result = $table->createSql($connection);
 		$this->assertCount(1, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 	}
 
 /**

+ 2 - 2
tests/TestCase/Database/Schema/SqliteSchemaTest.php

@@ -772,7 +772,7 @@ CONSTRAINT "primary" PRIMARY KEY ("article_id", "tag_id")
 SQL;
 		$result = $table->createSql($connection);
 		$this->assertCount(1, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 
 		// Sqlite only supports AUTO_INCREMENT on single column primary
 		// keys. Ensure that schema data follows the limitations of Sqlite.
@@ -800,7 +800,7 @@ CONSTRAINT "primary" PRIMARY KEY ("id", "account_id")
 SQL;
 		$result = $table->createSql($connection);
 		$this->assertCount(1, $result);
-		$this->assertEquals($expected, $result[0]);
+		$this->assertTextEquals($expected, $result[0]);
 	}
 
 /**