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


PHP anArtifact函数代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->artifact = anArtifact()->withId(9787)->build();
     $this->data = array('somekey' => 'somevalue');
     $this->node = new ArtifactNode($this->artifact, $this->data);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:NodeTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $tracker_factory = mock('TrackerFactory');
     $this->xml_importer = mock('Tracker_Artifact_XMLImport');
     $this->artifact_factory = mock('Tracker_ArtifactFactory');
     $this->children_collector = new Tracker_XML_ChildrenCollector();
     $this->importer = new Tracker_XML_Importer_ChildrenXMLImporter($this->xml_importer, $tracker_factory, $this->artifact_factory, $this->children_collector);
     $this->artifacts_imported_mapping = mock('Tracker_XML_Importer_ArtifactImportedMapping');
     $this->tracker = aTracker()->withId(23)->build();
     stub($tracker_factory)->getTrackerById(23)->returns($this->tracker);
     $this->tracker_2 = aTracker()->withId(24)->build();
     stub($tracker_factory)->getTrackerById(24)->returns($this->tracker_2);
     $this->user = aUser()->build();
     $artlink_field = anArtifactLinkField()->withId($this->field_id)->build();
     $artlink_field_2 = anArtifactLinkField()->withId($this->field_id_2)->build();
     $root_artifact_id = 456;
     $this->root_artifact = mock('Tracker_Artifact');
     stub($this->root_artifact)->getId()->returns($root_artifact_id);
     stub($this->root_artifact)->getAnArtifactLinkField($this->user)->returns($artlink_field);
     stub($this->artifact_factory)->getArtifactById($root_artifact_id)->returns($this->root_artifact);
     $this->created_artifact = mock('Tracker_Artifact');
     stub($this->created_artifact)->getId()->returns(1023);
     stub($this->created_artifact)->getAnArtifactLinkField($this->user)->returns($artlink_field_2);
     stub($this->artifact_factory)->getArtifactById(1023)->returns($this->created_artifact);
     $this->another_child_artifact = anArtifact()->withId(1024)->build();
     stub($this->artifact_factory)->getArtifactById(1024)->returns($this->another_child_artifact);
 }
开发者ID:amanikamail,项目名称:tuleap,代码行数:28,代码来源:ChildrenXMLImporterTest.php

示例3: __construct

 public function __construct()
 {
     $this->project = mock('Project');
     $this->planning = aPlanning()->build();
     $this->sub_milestones = array();
     $this->artifact = anArtifact()->build();
 }
开发者ID:nterray,项目名称:tuleap,代码行数:7,代码来源:aMilestone.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->milestone_1_id = 132;
     $this->milestone_1 = stub('Planning_ArtifactMilestone')->getArtifactId()->returns($this->milestone_1_id);
     $this->milestone_2_id = 853;
     $this->milestone_2 = stub('Planning_ArtifactMilestone')->getArtifactId()->returns($this->milestone_2_id);
     $this->virtual_top_milestone = stub('Planning_VirtualTopMilestone')->getArtifactId()->returns(null);
     $this->strategy_1 = mock('AgileDashboard_Milestone_Backlog_DescendantBacklogStrategy');
     $this->strategy_2 = mock('AgileDashboard_Milestone_Backlog_DescendantBacklogStrategy');
     $this->strategy_factory = mock('AgileDashboard_Milestone_Backlog_BacklogStrategyFactory');
     stub($this->strategy_factory)->getBacklogStrategy($this->milestone_1)->returns($this->strategy_1);
     stub($this->strategy_factory)->getBacklogStrategy($this->milestone_2)->returns($this->strategy_2);
     $this->backlog_item_collection_factory = mock('AgileDashboard_Milestone_Backlog_BacklogItemCollectionFactory');
     $this->sequence_id_manager = new AgileDashboard_SequenceIdManager($this->strategy_factory, $this->backlog_item_collection_factory);
     $this->user = aUser()->build();
     $this->artifact_id_1 = 123;
     $this->artifact_id_2 = 456;
     $this->artifact_id_3 = 789;
     $this->artifact_1 = anArtifact()->withId($this->artifact_id_1)->build();
     $this->artifact_2 = anArtifact()->withId($this->artifact_id_2)->build();
     $this->artifact_3 = anArtifact()->withId($this->artifact_id_3)->build();
     $this->artifact_id_4 = 254;
     $this->artifact_id_5 = 255;
     $this->artifact_id_6 = 256;
     $this->artifact_4 = anArtifact()->withId($this->artifact_id_4)->build();
     $this->artifact_5 = anArtifact()->withId($this->artifact_id_5)->build();
     $this->artifact_6 = anArtifact()->withId($this->artifact_id_6)->build();
     $this->backlog_item_1 = stub('AgileDashboard_Milestone_Backlog_BacklogItem')->getArtifact()->returns($this->artifact_1);
     $this->backlog_item_2 = stub('AgileDashboard_Milestone_Backlog_BacklogItem')->getArtifact()->returns($this->artifact_2);
     $this->backlog_item_3 = stub('AgileDashboard_Milestone_Backlog_BacklogItem')->getArtifact()->returns($this->artifact_3);
     $this->items_collection = new AgileDashboard_Milestone_Backlog_BacklogItemCollection();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:33,代码来源:SequenceIdManagerTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->tracker = aTracker()->build();
     $this->artifact_builder = anArtifact()->withTracker($this->tracker)->withChangesets(array(new Tracker_Artifact_Changeset_Null()));
     $this->formelement_factory = mock('Tracker_FormElementFactory');
     $this->initializator = new Tracker_Artifact_Changeset_ChangesetDataInitializator($this->formelement_factory);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:ChangesetDataInitializatorTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->trigger_rules_manager = mock('Tracker_Workflow_Trigger_RulesManager');
     $this->field = anArtifactLinkField()->build();
     $this->artifact = anArtifact()->build();
     $this->user = aUser()->build();
     $this->command = new Tracker_FormElement_Field_ArtifactLink_ProcessChildrenTriggersCommand($this->field, $this->trigger_rules_manager);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:ProcessChildrenTriggersCommandTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $this->client = mock('FullTextSearch_IIndexDocuments');
     $this->tracker_data_factory = mock('ElasticSearch_1_2_RequestTrackerDataFactory');
     $this->logger = mock('Logger');
     $this->tracker = aTracker()->withId(455)->build();
     $this->artifact = anArtifact()->withId(44)->withTracker($this->tracker)->build();
     $this->actions = new FullTextSearchTrackerActions($this->client, $this->tracker_data_factory, $this->logger);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:FullTextSearchTrackerActionsTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->setUpUsers();
     $this->project = stub('Project')->getId()->returns($this->project_id);
     $this->tracker = aMockTracker()->withId(120)->withProject($this->project)->build();
     $this->artifact_builder = anArtifact()->withTracker($this->tracker);
     $this->assignee_retriever = mock('Tracker_Permission_PermissionRetrieveAssignee');
     $this->serializer = new Tracker_Permission_PermissionsSerializer($this->assignee_retriever);
 }
开发者ID:magarnier,项目名称:tuleap,代码行数:10,代码来源:PermissionSerializerTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->artifact_id = 123;
     $this->artifact = anArtifact()->withId($this->artifact_id)->build();
     $this->milestone = aMilestone()->withArtifact($this->artifact)->build();
     $this->user = aUser()->build();
     $this->project = mock('Project');
     $this->milestone_factory = stub('Planning_MilestoneFactory')->getBareMilestoneByArtifactId($this->user, $this->artifact_id)->returns($this->milestone);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:SelectedMilestoneProviderTest.php

示例10: itCopiesAllTreeNodesIntoCardPresenterNodes

 public function itCopiesAllTreeNodesIntoCardPresenterNodes()
 {
     $root_node = aNode()->withChildren(aNode()->withObject(anArtifact()->withTracker(mock('Tracker'))->withoutParent()->build()), aNode()->withObject(anArtifact()->withTracker(mock('Tracker'))->withoutParent()->build()))->build();
     $card_mapper = new TreeNodeMapper(new Planning_ItemCardPresenterCallback(mock('Planning'), mock('Tracker_CardFields'), mock('User'), 'whatever-class'));
     $visited_node = $card_mapper->map($root_node);
     $all_nodes = $visited_node->flattenChildren();
     $this->assertEqual(count($all_nodes), count($root_node->flattenChildren()));
     foreach ($all_nodes as $node) {
         $this->assertIsA($node, 'Tracker_TreeNode_CardPresenterNode');
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:11,代码来源:ArtifactTreeNodeVisitorTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->milestone = aMilestone()->withArtifact(anArtifact()->withId(3)->build())->build();
     $this->backlog_tracker = aTracker()->withId(35)->build();
     $this->dao = mock('Tracker_ArtifactDao');
     $this->user = aUser()->build();
     $this->strategy_factory = mock('AgileDashboard_Milestone_Backlog_BacklogStrategyFactory');
     $this->backlog_item_collection_factory = mock('AgileDashboard_Milestone_Backlog_BacklogItemCollectionFactory');
     $this->provider = new AgileDashboard_BacklogItem_SubBacklogItemProvider($this->dao, $this->strategy_factory, $this->backlog_item_collection_factory);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:SubBacklogItemProviderTest.php

示例12: itDoesNothingIfTheArtifactTrackerIsNotInParentMilestoneBacklogTrackers

 public function itDoesNothingIfTheArtifactTrackerIsNotInParentMilestoneBacklogTrackers()
 {
     $artifact_added = anArtifact()->withId(101)->withTrackerId(201)->build();
     $parent_milestone_artifact = mock('Tracker_Artifact');
     $parent_milestone = stub('Planning_Milestone')->getArtifact()->returns($parent_milestone_artifact);
     $descendant_tracker = aTracker()->withId(202)->build();
     stub($this->strategy)->getDescendantTrackers()->returns(array($descendant_tracker));
     stub($this->milestone)->getParent()->returns($parent_milestone);
     expect($parent_milestone_artifact)->linkArtifact()->never();
     $this->milestone_parent_linker->linkToMilestoneParent($this->milestone, $this->user, $artifact_added);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:MilestoneParentLinkerTest.php

示例13: setUp

 public function setUp()
 {
     $this->reference_manager = mock('ReferenceManager');
     $this->artifact_factory = mock('Tracker_ArtifactFactory');
     $this->tracker_reference_manager = new Tracker_ReferenceManager($this->reference_manager, $this->artifact_factory);
     $this->keyword = 'art';
     $this->artifact_id = 101;
     $tracker = aTracker()->withId(101)->withName('My tracker')->build();
     $this->artifact = anArtifact()->withId(101)->withTracker($tracker)->build();
     $GLOBALS['Language'] = mock('BaseLanguage');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:ReferenceManagerTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->planning_id = '321';
     $this->user = aUser()->withId(12)->build();
     $this->request = aRequest()->with('planning_id', $this->planning_id)->withUser($this->user)->build();
     $this->milestone_factory = mock('Planning_MilestoneFactory');
     $this->current_milestone_artifact_id = 444;
     $milestone = aMilestone()->withArtifact(anArtifact()->withId($this->current_milestone_artifact_id)->build())->build();
     stub($this->milestone_factory)->getCurrentMilestone($this->user, $this->planning_id)->returns($milestone);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:11,代码来源:MilestoneSelectorControllerTest.php

示例15: itIgnoresPresentersIfThereIsNoMatchingColumn

 public function itIgnoresPresentersIfThereIsNoMatchingColumn()
 {
     $artifact = anArtifact()->build();
     $column = new Cardwall_Column(55, null, null, null);
     $columns = new Cardwall_OnTop_Config_ColumnCollection();
     $columns[] = $column;
     $cardincell_presenter = stub('Cardwall_CardInCellPresenter')->getArtifact()->returns($artifact);
     stub($this->config)->isInColumn($artifact, '*', $column)->returns(false);
     $swimlines = $this->factory->getCells($columns, array($cardincell_presenter));
     $expected = array(array('column_id' => 55, 'column_stacked' => true, 'cardincell_presenters' => array()));
     $this->assertIdentical($expected, $swimlines);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:SwimlineFactoryTest.php


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