]> git.agnieray.net Git - galette.git/blobdiff - tests/Galette/Core/tests/units/Install.php
Check MySQL warning in tests suite
[galette.git] / tests / Galette / Core / tests / units / Install.php
index 261e95dcc378275a7a926ec1acd27f15259bb17e..b3efd802ec2bd200add01961b97ed3e65809e2b6 100644 (file)
@@ -58,16 +58,31 @@ class Install extends atoum
     /**
      * Set up tests
      *
-     * @param stgring $testMethod Method tested
+     * @param stgring $method Method tested
      *
      * @return void
      */
-    public function beforeTestMethod($testMethod)
+    public function beforeTestMethod($method)
     {
         setlocale(LC_ALL, 'en_US');
         $this->install = new \Galette\Core\Install();
     }
 
+    /**
+     * Tear down tests
+     *
+     * @param string $method Calling method
+     *
+     * @return void
+     */
+    public function afterTestMethod($method)
+    {
+        if (TYPE_DB === 'mysql') {
+            $zdb = new \Galette\Core\Db();
+            $this->array($zdb->getWarnings())->isIdenticalTo([]);
+        }
+    }
+
     /**
      * Test constructor
      *