Example #1
0
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $user = $this->prophesize('oat\\oatbox\\user\\User');
     $user->getIdentifier()->willReturn('tastIdentifier\\_of_//User');
     $this->user = $user->reveal();
 }
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->installExtension('generisHard');
     $this->object = new core_kernel_classes_Class(RDFS_RESOURCE);
     $this->object->debug = __METHOD__;
 }
Example #3
0
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->fsPath = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'taoFileTestCase' . DIRECTORY_SEPARATOR;
     mkdir($this->fsPath);
     $this->fileSource = core_kernel_fileSystem_FileSystemFactory::createFileSystem(new core_kernel_classes_Resource(INSTANCE_GENERIS_VCS_TYPE_LOCAL), '', '', '', $this->fsPath, 'testFileSource', true);
 }
Example #4
0
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->directory = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "testrepo" . DIRECTORY_SEPARATOR;
     mkdir($this->directory);
     $this->repository = core_kernel_fileSystem_FileSystemFactory::createFileSystem(new core_kernel_classes_Resource(INSTANCE_GENERIS_VCS_TYPE_LOCAL), '', '', '', $this->directory, 'UnitTestRepository', true);
 }
Example #5
0
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->object = new core_kernel_classes_Resource(GENERIS_BOOLEAN);
     //create test class
     $clazz = new core_kernel_classes_Class(CLASS_GENERIS_RESOURCE);
     $this->clazz = $clazz->createSubClass($clazz);
 }
 /**
  * Setting the collection to test
  *
  */
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->object = new common_Collection(new common_Object(__METHOD__));
     $this->toto = new core_kernel_classes_Literal('toto', __METHOD__);
     $this->tata = new core_kernel_classes_Literal('tata', __METHOD__);
     $this->object->sequence[0] = $this->toto;
     $this->object->sequence[1] = $this->tata;
 }
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $classres = core_kernel_classes_ResourceFactory::create(new core_kernel_classes_Class(RDFS_CLASS), 'TestClass');
     $this->class = new core_kernel_classes_Class($classres->getUri());
     $this->assertIsA($this->class, 'core_kernel_classes_Class');
     $this->assertTrue($this->class->hasType(new core_kernel_classes_Class(RDFS_CLASS)));
     common_Logger::i('using class ' . $this->class->getUri() . ' for Create instance Tests');
 }
Example #8
0
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $dbWrapper = core_kernel_classes_DbWrapper::singleton();
     //TODO need to connect to a dbWrapper a function createTable that currently not exists
     $dbWrapper->exec('
             CREATE TABLE "dbTestCase" (
                 "id" INT,
                 "uri" VARCHAR(255) NOT NULL,
                 "coluMn1" VARCHAR(255) )');
     for ($i = 0; $i < 4; $i++) {
         $dbWrapper->exec('INSERT INTO  "dbTestCase" (id,uri,"coluMn1") VALUES (?,?,?) ;', array($i, 'http://uri' . $i, 'value' . $i));
     }
 }
Example #9
0
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $class = new core_kernel_classes_Class(CLASS_GENERIS_RESOURCE);
     $this->topClass = $class->createSubClass('test class 1');
     $this->emptyClass = $class->createSubClass('test class 2');
     $class1a = $this->topClass->createSubClass('test class 1a');
     $class1b = $this->topClass->createSubClass('test class 1b');
     $class1c = $this->topClass->createSubClass('test class 1c');
     $class1c1 = $class1c->createSubClass('test class 1c1');
     $instance1_1 = $this->topClass->createInstance('test instance 1.1');
     $instance1_2 = $this->topClass->createInstance('test instance 1.2');
     $instance1_3 = $this->topClass->createInstance('test instance 1.3');
     $instance1b_1 = $class1b->createInstance('test instance 1b.1');
     $instance1b_2 = $class1b->createInstance('test instance 1b.2');
     $instance1c1_1 = $class1c1->createInstance('test instance 1c1.1');
     $instance1c1_2 = $class1c1->createInstance('test instance 1c1.2');
 }
Example #10
0
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
 }
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->installExtension('generisHard');
     $this->createContextOfThetest();
 }
Example #12
0
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
 }
 /**
  * Setting the Api to test
  *
  */
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->object = core_kernel_impl_ApiModelOO::singleton();
 }
Example #14
0
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->service = core_kernel_users_Service::singleton();
     $this->sampleUser = $this->service->addUser(self::TESTCASE_USER_LOGIN, 'pwd' . rand());
 }
 /**
  * Make test case initializations
  * @see SimpleTestCase::setUp()
  */
 protected function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->installExtension('generisHard');
 }
Example #16
0
 /**
  * 
  * @see PHPUnit_Framework_TestCase::setUp()
  */
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->prophet = new Prophet();
 }
Example #17
0
 /**
  * 
  * @author Lionel Lecaque, lionel@taotesting.com
  */
 public function setUp()
 {
     GenerisPhpUnitTestRunner::initTest();
     $this->object = new core_kernel_classes_Property(PROPERTY_WIDGET);
 }