public function testReturnsResolvedThemeWhenOwnThemeIsNull() { // We don't call set() explicitly, // so next priority would be $themify->resolve(), // which we are mocking here $resolver = $this->mockResolver(); $resolver->shouldReceive('resolve')->once()->andReturn('bartheme'); // Use a Themify instance with a mocked resolver $t = new Themify($resolver, $this->mockViewFinder(), $this->mockDispatcher(), $this->mockConfig()); // Check that the theme being returned is the // one that the resolver found $this->assertEquals($t->get(), 'bartheme'); }
public function filter() { if (($theme = $this->themify->get()) !== null) { $this->events->fire('theme.set', array($theme, 5)); } }