Example #1
0
 public function compose(View $view)
 {
     $copyRighter = CopyrighterFactory::create();
     $view->with('copyright', $copyRighter->getCopyright());
 }
Example #2
0
 public function compose(View $view)
 {
     $copyRighter = CopyrighterFactory::create(['geo-locator' => 'FreeGeoIP']);
     $view->with('copyright', $copyRighter->getCopyright());
 }
 public function test_it_throws_exception_for_bad_configuration()
 {
     $this->setExpectedException('Copyrighter\\Exceptions\\InvalidConfigurationException');
     CopyrighterFactory::create(['foo' => 'bar']);
 }
 public function test_it_throws_exception_for_invalid_geolocator()
 {
     $copyrighter = \Copyrighter\CopyrighterFactory::create();
     $this->setExpectedException('Copyrighter\\Exceptions\\InvalidGeoLocatorException');
     $copyrighter->enableGeoAwareWith('FlimFlam');
 }