Пример #1
0
 protected function setUp()
 {
     unset($this->list);
     parent::setUp();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->getRepository()->clearObjectCache();
     $example->Forename = "Pugh";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Pugh";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Barney";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "McGrew";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Cuthbert";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Dibble";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Grub";
     $example->save();
     $this->list = new Collection("\\Rhubarb\\Stem\\Tests\\Fixtures\\Example");
 }
Пример #2
0
 protected function setUp()
 {
     unset($this->list);
     parent::setUp();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->getRepository()->clearObjectCache();
     $example->Forename = "John";
     $example->DateOfBirth = "1990-01-01";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Mary";
     $example->DateOfBirth = "1980-06-09";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Tom";
     $example->Surname = "Clancy";
     $example->DateOfBirth = "1976-05-09";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Clifford";
     $example->Surname = "Morris";
     $example->DateOfBirth = "1976-05-09";
     $example->save();
     $this->list = new Collection("\\Rhubarb\\Stem\\Tests\\Fixtures\\Example");
 }
 protected function setUp()
 {
     unset($this->list);
     parent::setUp();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->getRepository()->clearObjectCache();
     $example->Forename = "John";
     $example->Surname = "Joe";
     $example->DateOfBirth = "1990-01-01";
     $example->ContactID = 1;
     $example->save();
     $example->Forename = "John";
     $example->Surname = "Johnson";
     $example->DateOfBirth = "1988-01-01";
     $example->ContactID = 2;
     $example->save();
     $example->Forename = "John";
     $example->Surname = "Luc";
     $example->DateOfBirth = "1990-01-01";
     $example->ContactID = 3;
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Mary";
     $example->Surname = "Smithe";
     $example->DateOfBirth = "1980-06-09";
     $example->ContactID = 4;
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Tom";
     $example->Surname = "Thumb";
     $example->DateOfBirth = "1976-05-09";
     $example->ContactID = 5;
     $example->save();
     $this->list = new Collection("\\Rhubarb\\Stem\\Tests\\Fixtures\\Example");
 }
Пример #4
0
 protected function setUp()
 {
     unset($this->list);
     parent::setUp();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->getRepository()->clearObjectCache();
     $example->Forename = "John";
     $example->FavouriteNumber = 10;
     $example->DateOfBirth = "1990-01-01";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Mary";
     $example->FavouriteNumber = 15;
     $example->DateOfBirth = "1980-06-09";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Tom";
     $example->Surname = "Thumb";
     $example->FavouriteNumber = 30;
     $example->DateOfBirth = "1976-05-09";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Jimmy";
     $example->Surname = "Joe";
     $example->FavouriteNumber = 5;
     $example->DateOfBirth = "1976-05-10";
     $example->save();
     $this->list = new Collection("\\Rhubarb\\Stem\\Tests\\Fixtures\\Example");
 }
Пример #5
0
 protected function setUp()
 {
     parent::setUp();
     $this->context = new Context();
     $this->context->Request = null;
     $this->context->SimulateNonCli = true;
     $_SERVER["CONTENT_TYPE"] = "application/json";
 }
Пример #6
0
 protected function setUp()
 {
     parent::setUp();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->getRepository()->clearObjectCache();
     $example->Forename = "John";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Mary";
     $example->save();
     $example = new \Rhubarb\Stem\Tests\Fixtures\Example();
     $example->Forename = "Tom";
     $example->Surname = "Thumb";
     $example->save();
     $this->list = new Collection("\\Rhubarb\\Stem\\Tests\\Fixtures\\Example");
 }
Пример #7
0
 protected function setUp()
 {
     parent::setUp();
     $example = new Example();
     $example->getRepository()->clearObjectCache();
     $example = new Example();
     $example->Forename = "a";
     $example->CompanyID = 1;
     $example->save();
     $example = new Example();
     $example->Forename = "b";
     $example->CompanyID = 2;
     $example->save();
     $example = new Example();
     $example->Forename = "c";
     $example->CompanyID = 3;
     $example->save();
 }
 protected function setUp()
 {
     parent::setUp();
     Log::clearLogs();
     Log::attachLog($this->log = new UnitTestIndentedMessageLog(Log::DEBUG_LEVEL));
 }
 protected function setUp()
 {
     parent::setUp();
     EncryptionProvider::SetEncryptionProviderClassName('\\Rhubarb\\Crown\\Encryption\\UnitTesting\\UnitTestingAes256EncryptionProvider');
 }
 protected function setUp()
 {
     parent::setUp();
     ExceptionHandler::setExceptionHandlerClassName('\\Rhubarb\\Crown\\Exceptions\\Handlers\\DefaultExceptionHandler');
 }
Пример #11
0
 public function setUp()
 {
     Session::setDefaultSessionProviderClassName("Rhubarb\\Crown\\Sessions\\SessionProviders\\PhpSessionProvider");
     parent::setUp();
 }
Пример #12
0
 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";
 }
Пример #13
0
 protected function setUp()
 {
     parent::setUp();
     Log::clearLogs();
     Log::attachLog($this->log = new UnitTestLog(Log::ERROR_LEVEL));
 }