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