function test_delete()
 {
     // arrange
     $name = "Vegan";
     $test_option = new Option($name);
     $test_option->save();
     $name2 = "Seafood-free";
     $test_option2 = new Option($name2);
     $test_option2->save();
     // act
     $test_option2->delete();
     $result = Option::getAll();
     // assert
     $this->assertEquals([$test_option], $result);
 }
<?php

defined('MONSTRA_ACCESS') or die('No direct script access.');
// Delete Options
Option::delete('sandbox');
Option::delete('sandbox_template');
<?php

// let only monstra allow to use this script
defined('MONSTRA_ACCESS') or die('No direct script access.');
// Delete Options
Option::delete('toggle_duration');
Option::delete('toggle_easing');
<?php

// let only monstra allow to use this script
defined('MONSTRA_ACCESS') or die('No direct script access.');
// drop db tables
// Table::drop('events');
// Table::drop('categories');
// Table::drop('locations');
// Delete Options
Option::delete('upcon_title');
Option::delete('upcon_id');
Option::delete('upcon_active');
Option::delete('upcon_mail_confirmation');
Option::delete('upcon_mail_confirmation_subject');
Option::delete('upcon_mail_info');
Option::delete('upcon_mail_info_subject');
Option::delete('upcon_admin_mail');
示例#5
0
 /**
  *
  */
 public function delete_opt($i_key)
 {
     return Option::delete(get_called_class(), $this->id, $i_key);
 }
<?php

defined('MONSTRA_ACCESS') or die('No direct script access.');
// Delete Options
Option::delete('captcha_installed');