From d4f466ef635df340bcfe70ca58dc01753c78690c Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 27 Sep 2012 00:46:31 +0200 Subject: [PATCH] Revert --- tests/Exercice.php | 67 ---------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 tests/Exercice.php diff --git a/tests/Exercice.php b/tests/Exercice.php deleted file mode 100644 index c7db1f4227..0000000000 --- a/tests/Exercice.php +++ /dev/null @@ -1,67 +0,0 @@ -prenom = $prenom; - $this->sauvage = false; - } - - public function isSauvage() - { - return $this->sauvage; - } -} - -class Sanglier extends Cochon -{ - public function __construct($prenom) - { - $this->sauvage = true; - parent::__construct($prenom); - } -} - -$Robert = new Sanglier('Robert'); - -assert($Robert->isSauvage()); - -/** - * ----------------------------------------------------------------------------- - */ - -$connection = new PDO('sqlite::memory:'); - -$connection->beginTransaction(); - -try { - - $sql = 'INSERT INTO usr (id, nom, prenom, created_on) - VALUES (:id, :nom, :prenom, NOW())'; - - $stmt = $connection->prepare($sql); - - $n = 0; - - while ($n++ < 100) { - $stmt->execute(array( - ':id' => $n, - ':nom' => 'jean', - ':prenom' => 'bonno', - )); - } - -} catch (\PDOException $e) { - $connection->rollBack(); -} -