protected function setUp() { parent::setUp(); $this->context = $this->application->context(); $this->context->simulateNonCli = true; $_SERVER["CONTENT_TYPE"] = "application/json"; }
protected function setUp() { parent::setUp(); $this->context = $this->application->context(); $this->context->simulateNonCli = true; $_SERVER['CONTENT_TYPE'] = 'text/xml'; }
protected function setUp() { parent::setUp(); $this->application->context()->simulateNonCli = true; $this->request = $this->application->request(); $this->request->IsWebRequest = true; LayoutModule::disableLayout(); }
protected function setUp() { parent::setUp(); Application::current()->registerModule(new CommunicationsModule()); Application::current()->initialiseModules(); Model::clearAllRepositories(); CommunicationProcessor::setProviderClassName(EmailProvider::class, UnitTestingEmailProvider::class); Repository::setDefaultRepositoryClassName(Offline::class); Communication::clearObjectCache(); CommunicationItem::clearObjectCache(); }
protected function setUp() { parent::setUp(); $this->application = new Application(); $this->application->registerModule(new UnitTestingModule()); $this->application->registerModule(new UnitTestExceptionModule()); $this->application->initialiseModules(); Log::clearLogs(); Log::attachLog(self::$log = new UnitTestLog(Log::ERROR_LEVEL)); ExceptionHandler::enableExceptionTrapping(); }
protected function setUp() { parent::setUp(); // Create a text file to stream. file_put_contents("cache/unit-test-xml-stream.xml", '<?xml version="1.0" encoding="ISO-8859-1"?> <meals> <breakfast> <food>Sausage</food> <food>Eggs</food> <food>Eggs</food> </breakfast> <lunch> <food warmth="cold">Yoghurt</food> <drinks ordered="yes"> <drink>Coke</drink> <drink type="decaff">Tea</drink> </drinks> </lunch> <dinner> <!-- Test CDATA while were at it --> <dessert><![CDATA[Apple <b>Pie</b>]]>s<!-- Test of comments --></dessert> </dinner> <mints colour="dark" /> <!-- The desert below is not in a meal to test restricting a scan to a parent --> <dessert>Rhubarb Crumble</dessert> <dictionary height="tall"> <name>George</name> <children big="deal"> <joe>son</joe> <mary></mary> <john></john> </children> <interest>Fishing</interest> <interest>Golf</interest> <interest> <complexInterest>Sewing</complexInterest> <complexInterest>Knitting</complexInterest> </interest> <word> <name>a</name> </word> <word> <name>b</name> </word> <word> <name>c</name> </word> </dictionary> </meals> '); }
protected function setUp() { parent::setUp(); Log::clearLogs(); Log::attachLog($this->log = new UnitTestIndentedMessageLog(Log::DEBUG_LEVEL)); }
protected function setUp() { $this->response = new Response(); parent::setUp(); }
public function setUp() { parent::setUp(); $this->request = $this->application->request(); $this->request->IsWebRequest = true; }
protected function setUp() { parent::setUp(); Log::clearLogs(); Log::attachLog($this->log = new UnitTestLog(Log::ERROR_LEVEL)); }
protected function setUp() { parent::setUp(); $this->message1 = 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: multipart/related; boundary="----=_NextPart_01CF23F5.37621C10"' . "\r\n" . "\r\n" . 'This document is a Single File Web Page, also known as a Web Archive file.' . "\r\n" . "\r\n" . '------=_NextPart_01CF23F5.37621C10' . "\r\n" . 'Content-Location: file:///C:/2D794112/junk.htm' . "\r\n" . 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . "\r\n" . 'Body of first message' . "\r\n" . "\r\n" . '------=_NextPart_01CF23F5.37621C10' . "\r\n" . 'Test-Header: header2' . "\r\n" . "\r\n" . 'Body of second message' . "\r\n" . '------=_NextPart_01CF23F5.37621C10--' . "\r\n"; $this->message2 = 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: multipart/related; boundary="----=_NextPart_01CF23F5.37621C11"' . "\r\n" . "\r\n" . '------=_NextPart_01CF23F5.37621C11' . "\r\n" . 'Content-Location: file:///C:/2D794112/junk.htm' . "\r\n" . 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . "\r\n" . '<b:Sources SelectedStyle=3D"\\APASixthEditionOfficeOnline.xsl" StyleName=3D"=' . "\r\n" . 'APA" Version=3D"6" xmlns:b=3D"http://schemas.openxmlformats.org/officeDocum=' . "\r\n" . 'ent/2006/bibliography" xmlns=3D"http://schemas.openxmlformats.org/officeDoc=' . "\r\n" . 'ument/2006/bibliography"></b:Sources>' . "\r\n" . "\r\n" . '------=_NextPart_01CF23F5.37621C11' . "\r\n" . 'Test-Header: header2' . "\r\n" . "\r\n" . 'Body of second message' . "\r\n" . "\r\n" . '------=_NextPart_01CF23F5.37621C11' . "\r\n" . 'Test-Header: header3' . "\r\n" . 'Content-Type: image/jpeg' . "\r\n" . 'Content-Transfer-Encoding: base64' . "\r\n" . "\r\n" . 'VGVzdCENCg0KR2VudGxlIFJlYWRlcjoNCg0KVGhpcyBpcyBub3RoaW5nIG1vcmUgdGhhbiBh' . "\r\n" . 'IHRlc3QgZmlsZSBjcmVhdGVkIHRvIHByb3ZpZGUgZm9kZGVyIGZvciB0aGUgdmFyaW91cyBl' . "\r\n" . 'bmNvZGluZyBzY2hlbWVzLiBJZiB5b3UgYXJlIHVzaW5nIGl0IHRvIHRlc3QsIGNvbmdyYXR1' . "\r\n" . 'bGF0aW9ucyBvbiB5b3VyIGFnaWxpdHkgaW4gY3V0dGluZywgcGFzdGluZywgc2F2aW5nLCBh' . "\r\n" . 'bmQgZGVjb2RpbmcgdXNpbmcgV2luWmlwLg0KDQpFbmpveSE=' . "\r\n" . '------=_NextPart_01CF23F5.37621C11--' . "\r\n"; }
protected function setUp() { parent::setUp(); $this->container = new Container(); }
public function setUp() { parent::setUp(); Container::current()->registerClass(EncryptionProvider::class, Aes256ComputedKeyEncryptionProvider::class); }