Тестирование Ангуляр приложений может строится на разных стеках, будем считать, что вы работаете с "самым правильным". Итак:
- для юнит тестирование используется karma - бывший Testacular (который был переназван из-за хая, поднятого феменистками). В core-team есть разработчики ангуляра, поэтому часто называют карму продуктом команды ангуляра. Ранит ваши тесты или в бразуере, или в консоли (behind the scenes используя phantomjs - фантом).
- для e2e (end-to-end) тестирование раньше предлагалось использовать karma-scenario, сейчас ангуляровцы предлагают использовать protractor - враппер (и немного утилсов для настройки) над селениумом.
[http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html](http://www.yearofmoo.com/2013/01/full-spectrum-testing-with
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* | |
* Factory Design Pattern | |
* ----------------------- | |
* Wiki: In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating | |
* objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory | |
* method—either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived | |
* classes—rather than by calling a constructor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Vehicles; | |
use App\Helpers\CarbonFormatter; | |
use App\Http\Controllers\Controller; | |
use App\Models\Dictionaries\FuelType; | |
use App\Models\Vehicles\Fueling; | |
use App\Models\Vehicles\Car; | |
use Illuminate\Http\Request; | |
use Storage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\controllers; | |
use app\models\Login; | |
use app\models\Otchet; | |
use app\models\Result; | |
use app\models\Signup; | |
use Yii; | |
use yii\web\Controller; |
Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
##### ##### # # ##### ### ## # ##### ## ## | |
# # # # # # # # # # # # ## ## | |
##### # # # # # # # # # # ## | |
# # # # # # # # # # # # # # # | |
# # ##### ### # ### # ## ##### # # | |
# # | |
/** Router class by Mr CaT ) ) ) ######### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Vk { | |
private $vk; | |
private $owner; | |
public function __construct( vk $vk, $user = null, $group = null ) { | |
$this->vk = $vk; | |
if ( ! $user && ! $group ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Connect { | |
private $connection; | |
public function __construct(){ | |
$this->connect(); | |
} | |
public function connect(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Название класса не по psr1,psr-2, -> StaInstall | |
* Сама по себе реализация спорная. | |
* Тут 2 варианта идти по пути фреймворков (пользователя сами настраивают ) или все делает движок. | |
* в случае движка. мы должны не создавать новый файл конфигураций. я копировать config.demo.php в config.php, и уже там менять параметры. | |
* Прст, завтра мы захотим еще что-то там хранить. что будет тогда ? | |
*/ |
OlderNewer