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


PHP identicalTo函数代码示例

本文整理汇总了PHP中identicalTo函数的典型用法代码示例。如果您正苦于以下问题:PHP identicalTo函数的具体用法?PHP identicalTo怎么用?PHP identicalTo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: testFilterWhenThereAreDuplicatesAndNoPrimary

 public function testFilterWhenThereAreDuplicatesAndNoPrimary()
 {
     $suite_images = [['category' => 'variant', 'field1' => 'foobar', 'field2' => 'foobar'], ['category' => 'variant', 'field1' => 'foobar1', 'field2' => 'foobar2'], ['category' => 'variant', 'field1' => 'foobar', 'field2' => 'foobar']];
     $expected_filtered_images = [['category' => 'variant', 'field1' => 'foobar', 'field2' => 'foobar'], ['category' => 'variant', 'field1' => 'foobar1', 'field2' => 'foobar2']];
     $filtered_images = $this->filter_service->filter($suite_images);
     assertThat($filtered_images, identicalTo($expected_filtered_images));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:7,代码来源:ProductSuiteImageDuplicationFilterTest.php

示例2: testPrepWhenNullAddFormIsSupplied

 public function testPrepWhenNullAddFormIsSupplied()
 {
     $add_form_prepper = $this->app->make('Giftertipster\\Service\\Add\\AddFormPrepper');
     $prepped_add_form = $add_form_prepper->prep(null);
     $expected_prepped_add_form = [];
     assertThat($prepped_add_form, identicalTo($expected_prepped_add_form));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:7,代码来源:AddFormPrepperTest.php

示例3: testShouldReturnTokenResponseWhenTokenIsNotLoaded

 public function testShouldReturnTokenResponseWhenTokenIsNotLoaded()
 {
     $token = $this->givenAccessToken('');
     $token->response = 'irrelevant response (instanceof Response)';
     $response = $this->api->getStatus('irrelevant id');
     assertThat($response, identicalTo($token->response));
 }
开发者ID:sojki,项目名称:payments-sdk-php,代码行数:7,代码来源:PaymentsTest.php

示例4: testMakeBucketLabelReturnsExpectedResponseWhenMaxIsNull

 public function testMakeBucketLabelReturnsExpectedResponseWhenMaxIsNull()
 {
     $expected_response = '$10 +';
     $bucket = ['min' => 1000, 'max' => null];
     $response = $this->labeler->makeBucketLabel($bucket);
     assertThat($response, identicalTo($expected_response));
 }
开发者ID:ryanrobertsname,项目名称:laravel-elasticsearch-repository,代码行数:7,代码来源:PriceBucketLabelerTest.php

示例5: testIsProductSuiteBlacklistedReturnsFalseWhenItIsNot

 public function testIsProductSuiteBlacklistedReturnsFalseWhenItIsNot()
 {
     $create_response = $this->eloquent_bp->create(['vendor' => 'vendor.com', 'vendor_id' => 1]);
     $prod_suite_stub = ['vendor' => 'vendor.com', 'vendor_id' => 2];
     assertThat($create_response, equalTo(true));
     assertThat($this->eloquent_bp->isProductSuiteBlacklisted($prod_suite_stub), identicalTo(false));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:7,代码来源:EloquentBlacklistedProductRepositoryTest.php

示例6: testClearUserAddSelftProfile

 public function testClearUserAddSelftProfile()
 {
     \Session::put('Giftertipster\\Service\\Add\\AddProfileMgr.user_add_self_profile', 'test');
     assertThat(\Session::has('Giftertipster\\Service\\Add\\AddProfileMgr.user_add_self_profile'), identicalTo(true));
     $this->add_profile_mgr->clearUserAddSelfProfile();
     assertThat(\Session::has('Giftertipster\\Service\\Add\\AddProfileMgr.user_add_self_profile'), identicalTo(false));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:7,代码来源:AddProfileMgrTest.php

示例7: testValidateReturnsTrueOnSuccess

 public function testValidateReturnsTrueOnSuccess()
 {
     $filter = $this->app->make('Giftertipster\\Entity\\ProductSearchFilter\\CategoriesFilter');
     $validator = $this->app->make('Giftertipster\\Service\\Validate\\ProductSearchFilter\\FilterValidatorInterface');
     $response = $validator->validate($filter);
     assertThat($response, identicalTo(true));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:7,代码来源:AcmeFilterValidatorTest.php

示例8: testHasPermission

 public function testHasPermission()
 {
     $auth_helper_mock = \Mockery::mock('Jacopo\\Authentication\\Helpers\\SentryAuthenticationHelper');
     $auth_helper_mock->shouldReceive('hasPermission')->once()->with(['permissions stub'])->andReturn('foobar');
     $this->app->instance('authentication_helper', $auth_helper_mock);
     assertThat($this->authMgr()->hasPermission(['permissions stub']), identicalTo('foobar'));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:7,代码来源:AuthenticatorAuthMgrTest.php

示例9: matches_using_callback

 /**
  * @test
  */
 function matches_using_callback()
 {
     $matcher = new CallbackMatcher(function ($value) {
         return $value === "Hello, world.";
     });
     assertThat($matcher->matches("Hello, world."), is(identicalTo(true)));
 }
开发者ID:ascii-soup,项目名称:hamcrest-callback-matcher,代码行数:10,代码来源:CallbackMatcherTest.php

示例10: testUpdateForProduct

 public function testUpdateForProduct()
 {
     $product = Factory::create('Giftertipster\\Entity\\Eloquent\\Product');
     $keyword_profile = Factory::make('Giftertipster\\Entity\\Eloquent\\KeywordProfile');
     $product->keywordProfile()->save($keyword_profile);
     $this->repo->updateForProduct(1, ['profile' => ['updated', 'profile']]);
     assertThat(KeywordProfile::find(1)->profile, identicalTo(['updated', 'profile']));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:8,代码来源:EloquentKeywordProfileRepositoryTest.php

示例11: testMakeParamsReturnsExpectedParamsWhenRefreshIsRequested

 public function testMakeParamsReturnsExpectedParamsWhenRefreshIsRequested()
 {
     \Config::shouldReceive('get')->with('index.index_products_type_product')->once()->andReturn($this->config);
     $doc_id = 100;
     $params_mock = ['index' => 'tests', 'type' => 'test', 'id' => $doc_id, 'refresh' => true];
     $result = $this->gen->makeParams('products', 'product', $doc_id, true);
     assertThat($result, identicalTo($params_mock));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:8,代码来源:ESDeleteParamsGeneratorTest.php

示例12: testReceiveWithPolling

 public function testReceiveWithPolling()
 {
     $msgs = [];
     $this->client->receive(function ($msg) use(&$msgs) {
         $msgs[] = $msg;
     }, null);
     assertThat($msgs, is(identicalTo($this->messages)));
 }
开发者ID:traxo,项目名称:queue,代码行数:8,代码来源:ArrayIntegrationTest.php

示例13: testMakeCompilesBucketsCorrectlyAndReturnsResult

 public function testMakeCompilesBucketsCorrectlyAndReturnsResult()
 {
     $expected_result = ['label' => '$0 – $510', 'count' => 84, 'min' => null, 'max' => 51000, 'filter' => ['filter' => 'NumberRangeFilter', 'params' => ['field' => 'min_price', 'min' => null, 'max' => 51000]]];
     $this->bucket_label_mock->shouldReceive('makeBucketLabel')->with(['min' => $expected_result['min'], 'max' => $expected_result['max'], 'count' => $expected_result['count'], 'filter' => $expected_result['filter'], 'label' => ''])->andReturn($expected_result['label']);
     $processor = $this->app->make('Giftertipster\\Service\\ESIndex\\FacetsGenerator\\SmartRange\\Processor\\LowBucket\\LowBucketProcessor');
     $result = $processor->make($this->bucket_label_mock, 'min_price', 1000, $this->low_buckets, 1000);
     assertThat($result, identicalTo($expected_result));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:8,代码来源:LowBucketProcessorTest.php

示例14: write_withContentsAndAFile_writesContentsToTheFileOnTheFileSystem

 /**
  * @test
  */
 public function write_withContentsAndAFile_writesContentsToTheFileOnTheFileSystem()
 {
     $writtenContent = 'my new content that is awesome';
     $file = Mockery::mock('FileSystem\\File[]', array('file.txt', $this->rootObject));
     $file->content = $writtenContent;
     $this->fileSystem->write($file, VFS::url('root'));
     assertThat(file_get_contents(VFS::url('root/file.txt')), is(identicalTo($writtenContent)));
 }
开发者ID:lionar,项目名称:file-system,代码行数:11,代码来源:LocalFileSystemTest.php

示例15: testCheckIfPaginationExistsEnvPagination

 public function testCheckIfPaginationExistsEnvPagination()
 {
     $search = new SearchTraitDummyClass();
     $this->mock->shouldReceive('paginate')->once()->with(identicalTo(env('PAGINATION_NUMBER')))->andReturn(true);
     $query = $this->mock;
     $pagination = $search->checkIfPaginationExists($query);
     $this->assertTrue($pagination);
 }
开发者ID:00dav00,项目名称:marcadores-minimal,代码行数:8,代码来源:SearchTraitTest.php


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