/**
  * Test for the get() method.
  *
  * @return void
  */
 public function test_get()
 {
     $testee = new Testee();
     $action = 'action';
     $name = 'name';
     Monkey\Functions::when('sanitize_title_with_dashes')->returnArg();
     $context = new Context($action, $name);
     $nonce = 'nonce';
     Monkey\Functions::expect('wp_create_nonce')->with($action)->andReturn($nonce);
     Monkey\Functions::when('esc_attr')->returnArg();
     $this->assertSame("data-{$name}=\"{$nonce}\"", $testee->get($context));
 }
 /**
  * Test for the get() method.
  *
  * @return void
  */
 public function test_get()
 {
     $testee = new Testee();
     $action = 'action';
     $nonce = 'nonce';
     Monkey\Functions::expect('wp_create_nonce')->with($action)->andReturn($nonce);
     $name = 'name';
     /** @var Context $context */
     $context = Mockery::mock('Inpsyde\\Nonces\\Context')->shouldReceive('get_action')->andReturn($action)->shouldReceive('get_name')->andReturn($name)->getMock();
     Monkey\Functions::when('esc_attr')->returnArg();
     $this->assertSame("data-{$name}=\"{$nonce}\"", $testee->get($context));
 }