diff --git a/chromedriver b/chromedriver index 5a809fa..bf62e04 100755 Binary files a/chromedriver and b/chromedriver differ diff --git a/demo/bridge/doctrine/index.php b/demo/bridge/doctrine/index.php index 9a00acf..f771502 100644 --- a/demo/bridge/doctrine/index.php +++ b/demo/bridge/doctrine/index.php @@ -11,9 +11,10 @@ $debugbar->addCollector(new DebugBar\Bridge\DoctrineCollector($debugStack)); $product = new Demo\Product(); $product->setName("foobar"); - +$product->setUpdated(); $entityManager->persist($product); $entityManager->flush(); +$entityManager->createQuery("select p from Demo\\Product p where p.updated>:u")->setParameter("u", new \DateTime('1 hour ago'))->execute(); $entityManager->createQuery("select p from Demo\\Product p where p.name=:c")->setParameter("c", "")->execute(); render_demo_page(); diff --git a/demo/bridge/doctrine/src/Demo/Product.php b/demo/bridge/doctrine/src/Demo/Product.php index c7d8f08..d2a8a4f 100644 --- a/demo/bridge/doctrine/src/Demo/Product.php +++ b/demo/bridge/doctrine/src/Demo/Product.php @@ -11,6 +11,8 @@ class Product protected $id; /** @Column(type="string") **/ protected $name; + /** @Column(type="datetime", nullable=true) **/ + protected $updated; public function getId() { @@ -26,4 +28,10 @@ class Product { $this->name = $name; } + + public function setUpdated(): void + { + // will NOT be saved in the database + $this->updated = new \DateTime('now'); + } } diff --git a/tests/DebugBar/Tests/Browser/Bridge/DoctrineTest.php b/tests/DebugBar/Tests/Browser/Bridge/DoctrineTest.php index d66caa2..394ee00 100644 --- a/tests/DebugBar/Tests/Browser/Bridge/DoctrineTest.php +++ b/tests/DebugBar/Tests/Browser/Bridge/DoctrineTest.php @@ -32,8 +32,8 @@ class DoctrineTest extends AbstractBrowserTest return $node->getText(); }); - $this->assertEquals('INSERT INTO products (name) VALUES (?)', $statements[1]); - $this->assertCount(4, $statements); + $this->assertEquals('INSERT INTO products (name, updated) VALUES (?, ?)', $statements[1]); + $this->assertCount(5, $statements); } } \ No newline at end of file