function testDeenqueueStyle() { $styleStub = Mockery::mock(IIncludes::class); $styleStub->shouldReceive('init')->andReturn(true); $styleStub->shouldReceive('register'); $styleStub->shouldReceive('isRegistered')->andReturn(true); $styleStub->shouldReceive('isEnqueued')->andReturn(false); $styleStub->shouldReceive('dequeue')->andReturn($styleStub); $styleStub->shouldReceive('enqueue')->andReturn($styleStub); /** @var IIncludes $styleStub */ $si = new StyleIncludes($styleStub); $si->register($this->getTestFI()); $si->enqueue('administration', $this->getTestFI()); $this->assertTrue($si->dequeue('administration', 'popup') instanceof IIncludes); $this->assertFalse($si->isEnqueued('popup')); }