Exemplo n.º 1
0
 public function testVerifyMockObjectsVerifiesWpOptions()
 {
     // Prepare
     $this->setExpectedException('\\WpMock\\Exceptions\\ExpectationFailedException');
     WpOptions::expects('foo')->deleted();
     // Act
     $s = new WordPressTestCase();
     $s->verifyMockObjects();
 }
Exemplo n.º 2
0
 public function testAddOptionKeyAlreadySet()
 {
     // Prepare
     WpOptions::prepareOption('foo', 'bar');
     // Assert
     $this->assertFalse(\add_option('foo', 'baz'));
     $this->assertEquals('bar', \get_option('foo'));
 }