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


PHP Object::build方法代码示例

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


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

示例1: test_schemaUpdate

 /**
  * Test getting correct CMD for schema update
  *
  * @return void
  * @author Dan Cox
  */
 public function test_schemaUpdate()
 {
     $p = $this->process->build(['command' => ''])->getProcess();
     $this->assertEquals("'php' 'vendor/bin/doctrine'", $p->getCommandLine());
     $p = $this->process->build(['force' => true])->getProcess();
     $this->assertEquals("'php' 'vendor/bin/doctrine' 'orm:schema:update' '--force'", $p->getCommandLine());
 }
开发者ID:danzabar,项目名称:alice,代码行数:13,代码来源:DoctrineProcessTest.php

示例2: test_composerselfupdate

 /**
  * Test the self update command
  *
  * @return void
  * @author Dan Cox
  */
 public function test_composerselfupdate()
 {
     $this->process->build(['directory' => __DIR__]);
     $p = $this->process->setArguments(array('self-update'))->getProcess();
     $this->assertEquals(__DIR__, $p->getWorkingDirectory());
     $this->assertEquals("'composer' 'self-update'", $p->getCommandLine());
 }
开发者ID:danzabar,项目名称:alice,代码行数:13,代码来源:ComposerProcessTest.php

示例3: convertToAgendorObject

 public static function convertToAgendorObject($response)
 {
     $types = array('person' => 'Ivanwitzke\\Agendor\\People', 'deal' => 'Ivanwitzke\\Agendor\\Deal', 'organization' => 'Ivanwitzke\\Agendor\\Organization', 'task' => 'Ivanwitzke\\Agendor\\Task');
     if (self::isList($response)) {
         $output = array();
         foreach ($response as $j) {
             array_push($output, self::convertToAgendorObject($j));
         }
         return $output;
     } else {
         if (is_array($response)) {
             $objectName = self::getObjectName($response);
             if (isset($objectName) && is_string($objectName) && isset($types[$objectName])) {
                 $class = $types[$objectName];
             } else {
                 $class = 'Ivanwitzke\\Agendor\\Object';
             }
             return Object::build($response, $class);
         } else {
             return $response;
         }
     }
 }
开发者ID:ivanwitzke,项目名称:agendor-php,代码行数:23,代码来源:Util.php

示例4: test_defaults

 /**
  * Test setting the defaults
  *
  * @return void
  * @author Dan Cox
  */
 public function test_defaults()
 {
     $this->process->build();
     $process = $this->process->getProcess();
     $this->assertEquals('/usr/bin', $process->getWorkingDirectory());
 }
开发者ID:danzabar,项目名称:alice,代码行数:12,代码来源:ListProcessTest.php

示例5: createDI

 /**
  * Loads the DI with a specific Service File
  * Important to note that this function does not use the CACHED DI Container.
  *
  * @param String $serviceFile - the name of the service YAML file
  * @return void
  * @author Dan Cox
  */
 public function createDI($serviceFile = 'core')
 {
     $this->DI->build()->load($serviceFile)->compile();
 }
开发者ID:antoligy,项目名称:Framework,代码行数:12,代码来源:Environment.php

示例6: test_build

 /**
  * Test building the process
  *
  * @return void
  * @author Dan Cox
  */
 public function test_build()
 {
     $this->process->build();
     $this->assertEquals("'crontab' '/tmp/crontab.txt'", $this->process->getProcess()->getCommandLine());
 }
开发者ID:danzabar,项目名称:alice,代码行数:11,代码来源:CronProcessTest.php

示例7: test_clone

 /**
  * Test an example command, in this case git clone
  *
  * @return void
  * @author Dan Cox
  */
 public function test_clone()
 {
     $this->process->build(['directory' => __DIR__]);
     $p = $this->process->setArguments(['clone', 'http://'])->getProcess();
     $this->assertEquals("'git' 'clone' 'http://'", $p->getCommandLine());
 }
开发者ID:danzabar,项目名称:alice,代码行数:12,代码来源:GitProcessTest.php

示例8: test_verbose

 /**
  * Test that setting verbose argument enables output
  *
  * @return void
  * @author Dan Cox
  */
 public function test_verbose()
 {
     $this->process->build(['directory' => __DIR__, 'verbose' => TRUE]);
     $p = $this->process->setArguments(['ls'])->getProcess();
     $this->assertFalse($p->isOutputDisabled());
 }
开发者ID:danzabar,项目名称:alice,代码行数:12,代码来源:SkeletonProcessTest.php

示例9: setUp

 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     // Set up a new DI;
     $this->DI = new DI(dirname(__DIR__));
     $this->DI->build()->load('service');
 }
开发者ID:antoligy,项目名称:Framework,代码行数:12,代码来源:MockeryPassTest.php


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