Beispiel #1
0
 protected function notSeeInDatabase($table, $attributes)
 {
     switch ($table) {
         case 'ec_pages':
             $q = null;
             foreach ($attributes as $key => $value) {
                 if (is_null($q)) {
                     $q = Page::where($key, $value);
                 } else {
                     $q = $q->where($key, $value);
                 }
             }
             $this->assertCount(0, $q->get());
             break;
         case 'ec_textblocks':
             $q = null;
             foreach ($attributes as $key => $value) {
                 if (is_null($q)) {
                     $q = Textblock::where($key, $value);
                 } else {
                     $q = $q->where($key, $value);
                 }
             }
             $this->assertCount(0, $q->get());
             break;
         case 'ec_galleries':
             $q = null;
             foreach ($attributes as $key => $value) {
                 if (is_null($q)) {
                     $q = Gallery::where($key, $value);
                 } else {
                     $q = $q->where($key, $value);
                 }
             }
             $this->assertCount(0, $q->get());
             break;
         default:
             # code...
             break;
     }
 }