#1262 DDC-3513 - RunDqlCommand
should display the generated SQL when asked to do so
This commit is contained in:
parent
1c6fd512a5
commit
f06d652393
@ -64,10 +64,27 @@ class RunDqlCommandTest extends OrmFunctionalTestCase
|
|||||||
0,
|
0,
|
||||||
$this->tester->execute(array(
|
$this->tester->execute(array(
|
||||||
'command' => $this->command->getName(),
|
'command' => $this->command->getName(),
|
||||||
'dql' => 'SELECT e FROM ' . DateTimeModel::CLASSNAME . ' e'
|
'dql' => 'SELECT e FROM ' . DateTimeModel::CLASSNAME . ' e',
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertContains(DateTimeModel::CLASSNAME, $this->tester->getDisplay());
|
$this->assertContains(DateTimeModel::CLASSNAME, $this->tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testWillShowQuery()
|
||||||
|
{
|
||||||
|
$this->_em->persist(new DateTimeModel());
|
||||||
|
$this->_em->flush();
|
||||||
|
|
||||||
|
$this->assertSame(
|
||||||
|
0,
|
||||||
|
$this->tester->execute(array(
|
||||||
|
'command' => $this->command->getName(),
|
||||||
|
'dql' => 'SELECT e FROM ' . DateTimeModel::CLASSNAME . ' e',
|
||||||
|
'--show-sql' => 'true'
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertStringMatchesFormat('string \'SELECT %a', $this->tester->getDisplay());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user