- /**
- * Test blockedservers add command with the default reason
- */
- public function testAddBlockedServerWithDefaultReason()
- {
- $this->blocklistMock
- ->shouldReceive('addPattern')
- ->with('testme.now', DomainPatternBlocklist::DEFAULT_REASON)
- ->andReturn(1)
- ->once();
-
- $console = new ServerBlock($this->blocklistMock, $this->consoleArgv);
- $console->setArgument(0, 'add');
- $console->setArgument(1, 'testme.now');
- $txt = $this->dumpExecute($console);
-
- self::assertEquals('The domain pattern \'testme.now\' is now blocked. (Reason: \'' . DomainPatternBlocklist::DEFAULT_REASON . '\')' . "\n", $txt);
- }
-