/** * @test */ public function it_returns_given_string() { $string = 'testing'; $this->mock->expects($this->once())->method('suppress')->willReturn($string); $result = $this->suppressor->one($string); $this->assertEquals($result, $string); }
/** * @test */ public function it_suppress_max_and_min_width_string() { $inputString = ' @media (min-width: 992px) and (max-width: 1310px) { .p { text-align: center; } @media (min-width: 15px) and (max-width: 1310px) { @media (min-width: 1992px) and (max-width: 1310px) { } } } '; $expectedString = ' @media (min-width:2px) and (max-width:1px) { .p { text-align: center; } @media (min-width:1px) and (max-width:1px) { @media (min-width:3px) and (max-width:1px) { } } } '; $this->assertEquals($this->suppressor->one($inputString), $expectedString); }