Phalcon\Test\Unit\Db\Adapter\Pdo\MysqlTest::testDescribeReferencesColumnsCount PHP Method

testDescribeReferencesColumnsCount() public method

Tests Mysql::describeReferences
Since: 2016-09-28
Author: Wojciechj Ĺšlawski ([email protected])
    public function testDescribeReferencesColumnsCount()
    {
        $this->specify('The table references list contains wrong number of columns', function () {
            $references = $this->connection->describeReferences('robots_parts', TEST_DB_MYSQL_NAME);
            expect($references)->count(2);
            expect($this->connection->describeReferences('robots_parts', null))->count(2);
            /** @var Reference $reference */
            foreach ($references as $reference) {
                expect($reference->getColumns())->count(1);
            }
        });
    }