当前位置: 首页>>代码示例>>PHP>>正文


PHP UnitTester::wantToTest方法代码示例

本文整理汇总了PHP中UnitTester::wantToTest方法的典型用法代码示例。如果您正苦于以下问题:PHP UnitTester::wantToTest方法的具体用法?PHP UnitTester::wantToTest怎么用?PHP UnitTester::wantToTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnitTester的用法示例。


在下文中一共展示了UnitTester::wantToTest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testProcessProlog

 public function testProcessProlog()
 {
     $I = $this->tester;
     $this->tester->wantToTest("processing the prolog and importing the file into the database");
     $this->import->setCsvReader($this->import->file);
     $this->import->processProlog();
     $prolog = $this->import->prolog;
     $this->assertEquals(14, count($prolog['columns']), "There are the correct number of columns");
     $this->assertEquals(6, count($prolog['prefix']), "There are the correct number of prefix entries");
     $this->assertEquals(10, count($prolog['meta']), "There are the correct number of meta entries");
     $this->import->getDataColumnIds();
     $this->import->processData();
     $results = $this->import->results['success'];
     verify(
       "There were 8 rows processed",
       count($results['rows'])
     )->equals(12);
     $this->import->processParents();
     $I->seeRecordCountInDatabaseTable("SchemaPropertyElement", 138);
     $I->seeRecordCountInDatabaseTable("SchemaProperty", 12);
     //prolog namespace entries are readable
     //prolog headers are actually in row 1
     //prolog headers not in row 1 produce fatal error (logged)
     //prolog entries can be matched to database (column uri matched to profile id)
     //prolog entries that can't be matched produce fatal error (logged)
 } //
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:26,代码来源:importTest.php

示例2: testBool

 /**
  * Test boolean vnosnega polja.
  * 
  */
 public function testBool()
 {
     $this->tester->wantToTest('boolean form field');
     $this->form->add(['name' => 'v', 'type' => 'boolcheckbox', 'options' => ['required' => false]]);
     // preverim, da forma ni valid, čeje vrednosti ni
     $this->form->setData(['v' => null]);
     $this->assertTrue($this->form->isValid());
     $this->form->setData(['v' => '']);
     $this->assertTrue($this->form->isValid());
     $v = $this->form->getData();
     $this->assertNull($v['v']);
 }
开发者ID:ifigenija,项目名称:server,代码行数:16,代码来源:BoolTest.php


注:本文中的UnitTester::wantToTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。