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


PHP PHPUnit_Framework_Assert::readAttribute方法代码示例

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


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

示例1: it_applies_the_requested_relationship_to_the_query

 /**
  * @test
  */
 public function it_applies_the_requested_relationship_to_the_query()
 {
     /** @var ModelStub $model */
     $model = reader::readAttribute($this->repo, 'model');
     $this->repo->with('all')->getAll();
     $this->assertEquals(['author', 'comments'], $model->getRequestedRelationships());
 }
开发者ID:dannyweeks,项目名称:laravel-base-repository,代码行数:10,代码来源:BaseEloquentRepositoryTest.php

示例2: testSetup

 public function testSetup()
 {
     $app = $this->getApp();
     $tr = new TranslationFile($app, 'translations', 'en_GB');
     $this->assertEquals('translations', \PHPUnit_Framework_Assert::readAttribute($tr, 'domain'));
     $this->assertEquals('en_GB', \PHPUnit_Framework_Assert::readAttribute($tr, 'locale'));
 }
开发者ID:aaleksu,项目名称:bolt_cm,代码行数:7,代码来源:TranslationFileTest.php

示例3: testWhenInputIsSentToTheConstructorThenInitializeUsingTheInput

 /**
  * when input is sent to the constructor then initialize using the input
  */
 public function testWhenInputIsSentToTheConstructorThenInitializeUsingTheInput()
 {
     $input = array('a' => 'b', 'c' => 'd');
     $Collection = new \MySQLExtractor\Common\Collection($input);
     $elements = \PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');
     $this->assertEquals($input, $elements);
 }
开发者ID:bogdananton,项目名称:mysql-to-object-mapper,代码行数:10,代码来源:collectionTest.php

示例4: testAdd

 public function testAdd()
 {
     $factory = new WidgetFactory();
     $widget1 = \Mockery::mock('CSBill\\DashboardBundle\\Widgets\\WidgetInterface');
     $widget2 = \Mockery::mock('CSBill\\DashboardBundle\\Widgets\\WidgetInterface');
     $widget3 = \Mockery::mock('CSBill\\DashboardBundle\\Widgets\\WidgetInterface');
     $widget4 = \Mockery::mock('CSBill\\DashboardBundle\\Widgets\\WidgetInterface');
     $widget5 = \Mockery::mock('CSBill\\DashboardBundle\\Widgets\\WidgetInterface');
     $factory->add($widget1, 'top', 100);
     $factory->add($widget2, 'left_column', 200);
     $factory->add($widget3, 'right_column', 300);
     $factory->add($widget4, null, 400);
     $factory->add($widget5, 'left_column');
     $property = \PHPUnit_Framework_Assert::readAttribute($factory, 'queues');
     $this->assertTrue(is_array($property));
     $this->assertArrayHasKey('top', $property);
     $this->assertArrayHasKey('left_column', $property);
     $this->assertArrayHasKey('right_column', $property);
     $this->assertInstanceOf('SplPriorityQueue', $property['top']);
     $this->assertInstanceOf('SplPriorityQueue', $property['left_column']);
     $this->assertInstanceOf('SplPriorityQueue', $property['right_column']);
     $this->assertCount(2, $property['top']);
     $this->assertCount(2, $property['left_column']);
     $this->assertCount(1, $property['right_column']);
 }
开发者ID:Codixis,项目名称:CSBill,代码行数:25,代码来源:WidgetFactoryTest.php

示例5: testCustomConfigurationPassed

 public function testCustomConfigurationPassed()
 {
     $configuration = new GenericConfiguration();
     $configuration->setLocale('nl-be')->setClientName('test')->setRequest(new Request());
     $request = RequestFactory::createRequest($configuration);
     $this->assertSame($configuration, \PHPUnit_Framework_Assert::readAttribute($request, 'configuration'));
 }
开发者ID:cschalenborgh,项目名称:php-zalando,代码行数:7,代码来源:RequestFactoryTest.php

示例6: testNamespaces

 public function testNamespaces()
 {
     $this->converter->addNamespace('http://www.example.com', 'some\\php\\ns');
     $namespaces = \PHPUnit_Framework_Assert::readAttribute($this->converter, 'namespaces');
     $this->assertArrayHasKey('http://www.example.com', $namespaces);
     $this->assertEquals('some\\php\\ns', $namespaces['http://www.example.com']);
 }
开发者ID:josedasilva,项目名称:xsd2php,代码行数:7,代码来源:AbstractXsdConverterTest.php

示例7: testTimeoutProperty

 public function testTimeoutProperty()
 {
     $webshot = new Webshot();
     $this->assertEquals(30, PHPUnit_Framework_Assert::readAttribute($webshot, 'timeout'));
     $webshot->setTimeout(10);
     $this->assertEquals(10, PHPUnit_Framework_Assert::readAttribute($webshot, 'timeout'));
 }
开发者ID:hotrush,项目名称:Webshotter,代码行数:7,代码来源:PropertiesTest.php

示例8: testContracts

 public function testContracts()
 {
     $this->assertTrue($this->reflectedObject->isAbstract());
     $this->assertTrue($this->reflectedObject->hasMethod('cleanVar'));
     $this->assertTrue($this->reflectedObject->hasMethod('getVar'));
     $this->assertInstanceOf('\\Xoops\\Core\\Text\\Sanitizer', \PHPUnit_Framework_Assert::readAttribute($this->object, 'ts'));
 }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:7,代码来源:DtypeAbstractTest.php

示例9: testLoadHttp

 public function testLoadHttp()
 {
     MockTest::inject($this->_load, 'conf', ['conf' => ['tmp' => ['router' => MockTest::mockFileSystem([''])]]]);
     MockTest::inject($this->_load, 'routerYaml', MockTest::mockFile('router.yml'));
     $this->_load->loadHttp();
     $this->assertInstanceOf('App\\Resource\\Http', \PHPUnit_Framework_Assert::readAttribute($this->_load, 'http'));
 }
开发者ID:ignaszak,项目名称:cms,代码行数:7,代码来源:LoadTest.php

示例10: testSetConfigValueValid

 public function testSetConfigValueValid()
 {
     $client = new Client();
     $client->setConfig('scope', 'basic_user_info autoupload');
     $config = PHPUnit_Framework_Assert::readAttribute($client, 'config');
     $this->assertEquals('basic_user_info autoupload', $config->scope);
 }
开发者ID:guilhermefilippo,项目名称:olx-api-client,代码行数:7,代码来源:ClientTest.php

示例11: testConstructor

 public function testConstructor()
 {
     $_conf = \PHPUnit_Framework_Assert::readAttribute($this->ibc, 'conf');
     $_query = \PHPUnit_Framework_Assert::readAttribute($this->ibc, 'query');
     $this->assertInstanceOf('Conf\\Conf', $_conf);
     $this->assertInstanceOf('DataBase\\Query\\Query', $_query);
 }
开发者ID:ignaszak,项目名称:cms,代码行数:7,代码来源:IBreadcrumbsTest.php

示例12: testAddErrorsArray

 public function testAddErrorsArray()
 {
     MockTest::inject($this->validatorFactory, 'errorArray', ['anyKey' => 'initState']);
     $errors = ['anyKey2' => 'anyErrors'];
     MockTest::callMockMethod($this->validatorFactory, 'addErrors', [$errors]);
     $this->assertEquals(\PHPUnit_Framework_Assert::readAttribute($this->validatorFactory, 'errorArray'), ['anyKey' => 'initState', 'anyKey2' => 'anyErrors']);
 }
开发者ID:ignaszak,项目名称:cms,代码行数:7,代码来源:ValidatorFactoryTest.php

示例13: testRequestFactory

 public function testRequestFactory()
 {
     $configuration = new GenericConfiguration();
     $configuration->setApiKey('12345')->setTrackingKey('trackkey')->setDigitalSign('dummydigitalsign')->setRequest(new Request());
     $request = RequestFactory::createRequest($configuration);
     $this->assertSame($configuration, \PHPUnit_Framework_Assert::readAttribute($request, 'configuration'));
 }
开发者ID:clchangnet,项目名称:aliexapi,代码行数:7,代码来源:RequestFactoryTest.php

示例14: testSetAttributes

 /**
  * Test setting the attributes array.
  *
  * @covers ::setAttributes
  */
 public function testSetAttributes()
 {
     $bag = new CasPropertyBag($this->randomMachineName(8));
     $attributes = array('foo' => array('bar'), 'baz' => array('quux, foobar'));
     $bag->setAttributes($attributes);
     $this->assertEquals($attributes, \PHPUnit_Framework_Assert::readAttribute($bag, 'attributes'));
 }
开发者ID:pulibrary,项目名称:recap,代码行数:12,代码来源:CasPropertyBagTest.php

示例15: testConstructor

 public function testConstructor()
 {
     $_display = \PHPUnit_Framework_Assert::readAttribute($this->_controller, '_display');
     $this->assertInstanceOf('Ignaszak\\Exception\\Modules\\Display', $_display);
     $_logFile = \PHPUnit_Framework_Assert::readAttribute($this->_controller, '_logFile');
     $this->assertInstanceOf('Ignaszak\\Exception\\Modules\\LogFile', $_logFile);
 }
开发者ID:ignaszak,项目名称:php-exception,代码行数:7,代码来源:ControllerTest.php


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