/** * Test if the application name is returned correctly. * * @return void */ public function testGetName() { // create a stub for the ApplicationInterface $stub = $this->getMock('\\AppserverIo\\Psr\\Application\\ApplicationInterface'); // Configure the stub $stub->expects($this->any())->method('getName')->will($this->returnValue($name = 'global')); // create a new wrapper instance $wrapper = new ApplicationWrapper(); $wrapper->injectApplication($stub); // check if the name has been returned $this->assertSame($name, $wrapper->getName()); }
<?php namespace GlobalTechnology\MPDDashboard; require_once dirname(__FILE__) . '/vendor/autoload.php'; $wrapper = ApplicationWrapper::singleton(); $wrapper->authenticate(); if (empty($_GET)) { header('Content-Type: text/html; charset=UTF-8', true, 200); echo '<html><head><title>CAS Proxy Callback Handler</title></head><body></body></html>'; exit; }