mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 13:02:40 +00:00
Making postgres tests pass
This commit is contained in:
parent
d24c408537
commit
f0ef0aab62
4 changed files with 3 additions and 6 deletions
|
@ -437,7 +437,6 @@ class DboPostgresTest extends CakeTestCase {
|
|||
public function testSchemaScoping() {
|
||||
$db1 = ConnectionManager::getDataSource('test');
|
||||
$db1->cacheSources = false;
|
||||
$db1->reconnect(array('persistent' => false));
|
||||
$db1->query('CREATE SCHEMA _scope_test');
|
||||
|
||||
$db2 = ConnectionManager::create(
|
||||
|
@ -541,7 +540,6 @@ class DboPostgresTest extends CakeTestCase {
|
|||
public function testCakeSchema() {
|
||||
$db1 = ConnectionManager::getDataSource('test');
|
||||
$db1->cacheSources = false;
|
||||
$db1->reconnect(array('persistent' => false));
|
||||
|
||||
$db1->rawQuery('CREATE TABLE ' . $db1->fullTableName('datatype_tests') . ' (
|
||||
id serial NOT NULL,
|
||||
|
|
|
@ -5178,7 +5178,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
* @return void
|
||||
*/
|
||||
public function testUpdateAllEmptyValues() {
|
||||
$this->skipIf($this->db instanceof Sqlserver, 'This test is not compatible with SQL Server.');
|
||||
$this->skipIf($this->db instanceof Sqlserver || $this->db instanceof Postgres, 'This test is not compatible with Postgres or SQL Server.');
|
||||
|
||||
$this->loadFixtures('Author', 'Post');
|
||||
$model = new Author();
|
||||
|
|
|
@ -30,12 +30,11 @@ class CounterCachePostFixture extends CakeTestFixture {
|
|||
'id' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'title' => array('type' => 'string', 'length' => 255),
|
||||
'user_id' => array('type' => 'integer', 'null' => true),
|
||||
'user_id' => array('type' => 'integer', 'null' => true),
|
||||
'published' => array('type' => 'boolean', 'null' => false, 'default' => 0)
|
||||
);
|
||||
|
||||
public $records = array(
|
||||
array('id' => 1, 'title' => 'Rock and Roll', 'user_id' => 66, 'published' => false),
|
||||
array('id' => 1, 'title' => 'Rock and Roll', 'user_id' => 66, 'published' => 0),
|
||||
array('id' => 2, 'title' => 'Music', 'user_id' => 66, 'published' => true),
|
||||
array('id' => 3, 'title' => 'Food', 'user_id' => 301, 'published' => true),
|
||||
);
|
||||
|
|
|
@ -48,6 +48,6 @@ class DatatypeFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
var $records = array(
|
||||
array('id' => 1, 'float_field' => 42.23, 'bool' => false),
|
||||
array('id' => 1, 'float_field' => 42.23, 'bool' => 0),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue