phpci/PHPCI/Plugin/PhpSpec.php

30 lines
617 B
PHP
Raw Normal View History

2013-05-14 15:37:14 +02:00
<?php
2013-05-16 03:16:56 +02:00
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
2013-05-14 15:37:14 +02:00
namespace PHPCI\Plugin;
class PhpSpec implements \PHPCI\Plugin
{
protected $phpci;
public function __construct(\PHPCI\Builder $phpci, array $options = array())
{
$this->phpci = $phpci;
}
public function execute()
{
$curdir = getcwd();
chdir($this->phpci->buildPath);
$success = $this->phpci->executeCommand(PHPCI_BIN_DIR . 'phpspec');
chdir($curdir);
return $success;
2013-05-14 15:37:14 +02:00
}
}