/**
  * @expectedException InvalidArgumentException
  */
 public function testNonExistentViewThrowsException()
 {
     $finder = new IlluminateViewFinder($filesystem = m::mock('Illuminate\\Filesystem\\Filesystem'), array(__DIR__));
     $finder->setThemeBag($bag = $this->getMockThemeBag());
     $bag->shouldReceive('getCascadedPackageViewPaths')->with('foo')->once()->andReturn($paths = array('foo/1'));
     $filesystem->shouldReceive('exists')->with('foo/1/bar.blade.php')->once()->andReturn(false);
     $filesystem->shouldReceive('exists')->with('foo/1/bar.php')->once()->andReturn(false);
     $bag->shouldReceive('getActive')->once()->andReturn($active = m::mock('Cartalyst\\Themes\\ThemeInterface'));
     $active->shouldReceive('getSlug')->once()->andReturn('foo/bar');
     $active->shouldReceive('getParentSlug')->once()->andReturn('foo/baz');
     $bag->shouldReceive('getFallback')->once()->andReturn($fallback = m::mock('Cartalyst\\Themes\\ThemeInterface'));
     $fallback->shouldReceive('getSlug')->once()->andReturn('foo/corge');
     $finder->find('foo::bar');
 }