本文整理汇总了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));
}
示例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));
}
示例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));
}
示例4: testMakeBucketLabelReturnsExpectedResponseWhenMaxIsNull
public function testMakeBucketLabelReturnsExpectedResponseWhenMaxIsNull()
{
$expected_response = '$10 +';
$bucket = ['min' => 1000, 'max' => null];
$response = $this->labeler->makeBucketLabel($bucket);
assertThat($response, identicalTo($expected_response));
}
示例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));
}
示例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));
}
示例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'));
}
示例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)));
}
示例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']));
}
示例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));
}
示例12: testReceiveWithPolling
public function testReceiveWithPolling()
{
$msgs = [];
$this->client->receive(function ($msg) use(&$msgs) {
$msgs[] = $msg;
}, null);
assertThat($msgs, is(identicalTo($this->messages)));
}
示例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));
}
示例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)));
}
示例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);
}