Skip to content

Commit

Permalink
Fixed PHPUnit tests with pdo_sqlsrv
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed May 24, 2019
1 parent e864a49 commit 1b114ce
Showing 1 changed file with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,54 +293,54 @@ public function testListTableColumns() : void

self::assertArrayHasKey('test', $columns);
self::assertEquals(1, array_search('test', $columnsKeys));
self::assertEquals('test', strtolower($columns['test']->getname()));
self::assertInstanceOf(StringType::class, $columns['test']->gettype());
self::assertEquals(255, $columns['test']->getlength());
self::assertEquals(false, $columns['test']->getfixed());
self::assertEquals(false, $columns['test']->getnotnull());
self::assertEquals('expected default', $columns['test']->getdefault());
self::assertEquals('test', strtolower($columns['test']->getName()));
self::assertInstanceOf(StringType::class, $columns['test']->getType());
self::assertEquals(255, $columns['test']->getLength());
self::assertEquals(false, $columns['test']->getFixed());
self::assertEquals(false, $columns['test']->getNotnull());
self::assertEquals('expected default', $columns['test']->getDefault());
self::assertIsArray($columns['test']->getPlatformOptions());

self::assertEquals('foo', strtolower($columns['foo']->getname()));
self::assertEquals('foo', strtolower($columns['foo']->getName()));
self::assertEquals(2, array_search('foo', $columnsKeys));
self::assertInstanceOf(TextType::class, $columns['foo']->gettype());
self::assertEquals(false, $columns['foo']->getunsigned());
self::assertEquals(false, $columns['foo']->getfixed());
self::assertEquals(true, $columns['foo']->getnotnull());
self::assertEquals(null, $columns['foo']->getdefault());
self::assertInstanceOf(TextType::class, $columns['foo']->getType());
self::assertEquals(false, $columns['foo']->getUnsigned());
self::assertEquals(false, $columns['foo']->getFixed());
self::assertEquals(true, $columns['foo']->getNotnull());
self::assertEquals(null, $columns['foo']->getDefault());
self::assertIsArray($columns['foo']->getPlatformOptions());

self::assertEquals('bar', strtolower($columns['bar']->getname()));
self::assertEquals('bar', strtolower($columns['bar']->getName()));
self::assertEquals(3, array_search('bar', $columnsKeys));
self::assertInstanceOf(DecimalType::class, $columns['bar']->gettype());
self::assertEquals(null, $columns['bar']->getlength());
self::assertEquals(10, $columns['bar']->getprecision());
self::assertEquals(4, $columns['bar']->getscale());
self::assertEquals(false, $columns['bar']->getunsigned());
self::assertEquals(false, $columns['bar']->getfixed());
self::assertEquals(false, $columns['bar']->getnotnull());
self::assertEquals(null, $columns['bar']->getdefault());
self::assertInstanceOf(DecimalType::class, $columns['bar']->getType());
self::assertEquals(null, $columns['bar']->getLength());
self::assertEquals(10, $columns['bar']->getPrecision());
self::assertEquals(4, $columns['bar']->getScale());
self::assertEquals(false, $columns['bar']->getUnsigned());
self::assertEquals(false, $columns['bar']->getFixed());
self::assertEquals(false, $columns['bar']->getNotnull());
self::assertEquals(null, $columns['bar']->getDefault());
self::assertIsArray($columns['bar']->getPlatformOptions());

self::assertEquals('baz1', strtolower($columns['baz1']->getname()));
self::assertEquals('baz1', strtolower($columns['baz1']->getName()));
self::assertEquals(4, array_search('baz1', $columnsKeys));
self::assertInstanceOf(DateTimeType::class, $columns['baz1']->gettype());
self::assertEquals(true, $columns['baz1']->getnotnull());
self::assertEquals(null, $columns['baz1']->getdefault());
self::assertInstanceOf(DateTimeType::class, $columns['baz1']->getType());
self::assertEquals(true, $columns['baz1']->getNotnull());
self::assertEquals(null, $columns['baz1']->getDefault());
self::assertIsArray($columns['baz1']->getPlatformOptions());

self::assertEquals('baz2', strtolower($columns['baz2']->getname()));
self::assertEquals('baz2', strtolower($columns['baz2']->getName()));
self::assertEquals(5, array_search('baz2', $columnsKeys));
self::assertContains($columns['baz2']->gettype()->getName(), ['time', 'date', 'datetime']);
self::assertEquals(true, $columns['baz2']->getnotnull());
self::assertEquals(null, $columns['baz2']->getdefault());
self::assertContains($columns['baz2']->getType()->getName(), ['time', 'date', 'datetime']);
self::assertEquals(true, $columns['baz2']->getNotnull());
self::assertEquals(null, $columns['baz2']->getDefault());
self::assertIsArray($columns['baz2']->getPlatformOptions());

self::assertEquals('baz3', strtolower($columns['baz3']->getname()));
self::assertEquals('baz3', strtolower($columns['baz3']->getName()));
self::assertEquals(6, array_search('baz3', $columnsKeys));
self::assertContains($columns['baz3']->gettype()->getName(), ['time', 'date', 'datetime']);
self::assertEquals(true, $columns['baz3']->getnotnull());
self::assertEquals(null, $columns['baz3']->getdefault());
self::assertContains($columns['baz3']->getType()->getName(), ['time', 'date', 'datetime']);
self::assertEquals(true, $columns['baz3']->getNotnull());
self::assertEquals(null, $columns['baz3']->getDefault());
self::assertIsArray($columns['baz3']->getPlatformOptions());
}

Expand Down

0 comments on commit 1b114ce

Please sign in to comment.