• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP identicalTo函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: testSubProductMatchingVendorIdReturnsFalseWhenThereAreNoMatches

 public function testSubProductMatchingVendorIdReturnsFalseWhenThereAreNoMatches()
 {
     $sub_product = Factory::create('Giftertipster\\Entity\\Eloquent\\SubProduct', ['vendor_id' => 'asin stub2']);
     $sub_product2 = Factory::create('Giftertipster\\Entity\\Eloquent\\SubProduct', ['vendor_id' => 'asin stub2']);
     $sub_product_repo = $this->app->make('Giftertipster\\Repository\\SubProduct\\EloquentSubProductRepository');
     $result_sub_product = $sub_product_repo->subProductMatchingVendorId('asin stub');
     assertThat($result_sub_product, identicalTo(false));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:8,代码来源:EloquentSubProductRepositoryTest.php


示例17: construct_

 /**
  * @test
  */
 function construct_()
 {
     $extract = array('obj' => new \stdClass());
     $cfg = array('pdo' => $this->pdo, 'extract' => $extract);
     $config = new Config($cfg, __FILE__);
     $adapter = new PdoAdapter($this->pdo);
     assertThat($config->adapter, isInstanceOf(get_class($adapter)));
     assertThat($config->extract, identicalTo($extract));
 }
开发者ID:sickhye,项目名称:php-db-migrate,代码行数:12,代码来源:ConfigTest.php


示例18: testMakeParamsReturnsExpectedParams

 public function testMakeParamsReturnsExpectedParams()
 {
     \Config::shouldReceive('get')->with('index.index_products_type_product')->once()->andReturn($this->config);
     \Config::shouldReceive('get')->with('index.index_products_type_add')->once()->andReturn($this->child_config);
     $doc_id = 100;
     $params_mock = ['index' => 'tests', 'type' => 'test,testchild', 'body' => ['query' => ['bool' => ['should' => [['term' => ['_parent' => 'test#' . $doc_id]], ['ids' => ['type' => 'test', 'values' => [$doc_id]]]]]]]];
     $result = $this->gen->makeParams('products', 'product', ['add'], $doc_id);
     assertThat($result, identicalTo($params_mock));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:9,代码来源:ESDeleteWithChildrenParamsGeneratorTest.php


示例19: testMakeReturnsExpectedFilterWhenValueIsEmpty

 public function testMakeReturnsExpectedFilterWhenValueIsEmpty()
 {
     $filter_type = 'TermFilter';
     $filter_params = ['field' => 'testfield', 'value' => ''];
     $expected_response = ['term' => ['testfield' => '']];
     $filter = $this->app->make('Giftertipster\\Service\\ESIndex\\ParamsGenerator\\Search\\Filters\\' . $filter_type);
     $response = $filter->make($filter_params);
     assertThat($response, identicalTo($expected_response));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:9,代码来源:TermFilterTest.php


示例20: testMakeReturnsNoFacetDivisionsWhenIndexReturnsOnlyOneDivision

 public function testMakeReturnsNoFacetDivisionsWhenIndexReturnsOnlyOneDivision()
 {
     $term_facet_generator = $this->app->make('Giftertipster\\Service\\ESIndex\\FacetsGenerator\\Term\\ESTermGenerator');
     $filter_field_name_stub = 'testfield';
     $buckets_stub = [['key' => 'value1', 'doc_count' => 3]];
     $expected_response = [];
     $response = $term_facet_generator->make($filter_field_name_stub, $buckets_stub);
     assertThat($response, identicalTo($expected_response));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:9,代码来源:ESTermGeneratorTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP identification1函数代码示例发布时间:2022-05-15
下一篇:
PHP idcmp函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap