/** * Test for the create() method. * * @dataProvider provide_create_data * * @param string $expected_action * @param string $expected_name * @param string $action * @param string $name * * @return void */ public function test_create($expected_action, $expected_name, $action, $name) { $testee = new Testee(); Monkey\Functions::when('sanitize_title_with_dashes')->returnArg(); $context = $testee->create($action, $name); $this->assertSame($expected_action, $context->get_action()); $this->assertSame($expected_name, $context->get_name()); }
/** * Test for the create() method. * * @return void */ public function test_create() { $testee = new Testee(); Monkey\Functions::when('sanitize_title_with_dashes'); $this->assertInstanceOf('Inpsyde\\Nonces\\Context', $testee->create('action')); }