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(); -} -