mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-22 06:47:19 +00:00
test: Fixed PostgresTest::testAlterSchema()
The last few lines of PostgresTest::testAlterSchema() were added in the following commit. There was a problem, but the test succeeds in less than PHP 7.4.
6a4e7558fc (diff-bb8406239275388d1950fd590496d45d70b9e85b1c521ec75837e1138c9743d9)
In PHP 7.4+, after executing DboSource::dropSchema(), executing DboSource::alterSchema() raises a "Warning Error" and the test fails.
This commit is contained in:
parent
ca2c909ac9
commit
ddd53dd874
1 changed files with 2 additions and 2 deletions
|
@ -703,8 +703,6 @@ class PostgresTest extends CakeTestCase {
|
|||
$this->assertEquals(true, $result['author_id']['null']);
|
||||
$this->assertEquals(false, $result['title']['null']);
|
||||
|
||||
$this->Dbo->query($this->Dbo->dropSchema($New));
|
||||
|
||||
$New = new CakeSchema(array(
|
||||
'connection' => 'test_suite',
|
||||
'name' => 'AlterPosts',
|
||||
|
@ -720,6 +718,8 @@ class PostgresTest extends CakeTestCase {
|
|||
));
|
||||
$result = $this->Dbo->alterSchema($New->compare($Old), 'alter_posts');
|
||||
$this->assertDoesNotMatchRegularExpression('/varchar\(36\) NOT NULL/i', $result);
|
||||
|
||||
$this->Dbo->query($this->Dbo->dropSchema($New));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue