Learning Laravelexisting third-party packages. Main Features MVC Laravel uses the MVC model, therefore there are three core-parts of the framework which work https://riptutorial.com/ 2 together: models, views and controllers Database Transactions in Unit Test Laravel allows database to rollback all the change during the tests. For testing multiple database connections, you need to set $connectionsToTransact properties use app directory to src. Override Application class The directories name app is hardcoded into the core Application class, so it has to be overridden. Create a new file Application.php. I prefer to keep0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.6 中文文档public (应 用根目录下的 public 目录)目录下生成一个软连接 storage 指向这个目录。你可以通过 php artisan storage:link 命令生成这个软链接。 Tests 目录 tests 目录包含自动化测试文件,其中默认已经提供了一个开箱即用的 PHPUnit 示例;每一个测试类都要以 Test 开头,你可以通过 phpunit 或 php vendor/bin/phpunit 我们可以这样编写测试来验证 Cache::get 方法以我们期望的方式被调用: use Illuminate\Support\Facades\Cache; /** * A basic functional test example. * * @return void */ public function testBasicExample() { Cache::shouldReceive('get') 方法,因此,尽管我们使用这个辅助函数,我们还是可以编写如下测试来验证这个方法以我 们期望的方式和参数被调用: use Illuminate\Support\Facades\Cache; /** * A basic functional test example. * * @return void */ public function testBasicExample() { Cache::shouldReceive('get')0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.3 中文文档访问的目的,你还需要在 public 目录下生成一个软连接 storage 指向这个目录。你可以通过 php artisan storage:link 命令生成这个软链接。 Tests 目录 tests 目录包含自动化测试,其中已经提供了一个开箱即用的 PHPUnit 示例;每一个测试类都要 以 Test 开头,你可以通过 phpunit 或 php vendor/bin/phpunit 我们可以这样编写测试来验证 Cache::get 方法以我们期望的方式被调用: use Illuminate\Support\Facades\Cache; /** * A basic functional test example. * * @return void */ public function testBasicExample() { Cach Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 88 /** * A basic functional test example. * * @return void */ public function testBasicExample() { Cach0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档(应用根目录下的 public 目录)目录下生成一个软连 接 storage 指向这个目录。你可以通过 php artisan storage:link 命令生成这个软链接。 测试目录 tests 目录包含自动化测试文件,其中默认已经提供了一个开箱即用 的 PHPUnit 示例;每一个测试类都要以 Test 开头,你可以通 过 phpunit 或 php vendor/bin/phpunit 我们可以这样编写测试来验证 Cache::get 方法以我们期望的方式 被调用: use Illuminate\Support\Facades\Cache; /** * A basic functional test example. * * @return void */ public function testBasicExample() { Cache::shouldReceive('get') Laravel 中文学习资源:https://xueyuanjun.com 142 use Illuminate\Support\Facades\Cache; /** * A basic functional test example. * * @return void */ public function testBasicExample() { Cache::shouldReceive('get')0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 3.2 Documentation.......... 74 Running Tests ............................................................................................................. 74 Calling Controllers From Tests ........................ .............................................................................. 120 x Unit Tests (More Information) .............................................................................. date, too! Unit-Testing is an important part of Laravel. Laravel itself sports hundreds of tests to help ensure that new changes don't unexpectedly break anything. This is one of the reasons why0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.0 Documentation
4.1.26 From <= 4.1.25 v. Upgrading To 4.1 From 4.0 iii. Contribution Guide i. Bug Reports ii. Core Development Discussion iii. Which Branch? iv. Security Vulnerabilities v. Coding Style 3. Setup Introduction ii. Creating Commands iii. Dispatching Commands iv. Queued Commands v. Command Pipeline vi. Core Extension i. Managers & Factories ii. Cache iii. Session iv. Authentication v. IoC Based Extension Extending Blade xxi. Unit Testing i. Introduction ii. Defining & Running Tests iii. Test Environment iv. Calling Routes From Tests v. Mocking Facades vi. Framework Assertions vii. Helper Methods viii0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 5.2 中文文档目录包含 应用的日志文件; 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 71 tests 目录包含自动化测试,其中已经提供了一个开箱即用的 PHPUnit 示例; vendor 目录包含 Composer 依赖; 3、App 目录 应用的核心代码位于 app 目录下,默认情况下,该目录位于命名空间 植根于测试,实际上,内置使用 PHPUnit 对测试提供支持是即开即用的,并且 phpunit.xml 文件已经为应用设置好了。框架还提供了方便的辅助方法允许你对应用进行 富有表现力的测试。 tests 目录中提供了一个 ExampleTest.php 文件,安装完新的 Laravel 应用后,只需简单 在命令行运行 phpunit 来运行测试。 1.1 测试环境 运行测试的时候,Laravel 文 件中配置。 1.2 定义&运行测试 要创建一个新的测试用例,可以使用如下 Artisan 命令: php artisan make:test UserTest 该命令将会在 tests 目录下生成一个新的 UserTest 类。然后你可以使用 PHPUnit 定义测 试方法。要运行测试,简单从终端执行 phpunit 命令即可:0 码力 | 377 页 | 4.56 MB | 1 年前3
《Slides Dev Web》02. Introduction aux frameworks PHP
réutilisables (faible couplage) • Règles de codage et d’architecture • Code sûr et efficace • Facilite les tests et la gestion de projets complexes • Utilisation de Design Patterns dès que possible • Comportement contrôleurs Smart URL & SEO Autres Services • Migrations : Evolutions de la strucutre de la BDD • Tests • Génération, validation et traitement de formulaires • Authenfication, Sessions, Permissions, Roles 27https://httpd.apache.org/docs/current/mod/mod_rewrite.html 28http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files 18 // 04-routes/index.php $uri = $_SERVER['REQUEST_URI'], $matches = [];0 码力 | 24 页 | 1.03 MB | 1 年前3
The Laravel Handbook
clean up the routes a bit, add a more beautiful design. I have this list of views we used in our tests: 37 Remove test.blade.php and welcome.blade.php . In routes/web.php we’re going to show the fan of investing some money and saving time instead. Forge in particular is official, made by the core team of Laravel, lots and lots of people use it (they claim over 500,000 sites are powered by Forge)0 码力 | 111 页 | 14.25 MB | 1 年前3
《Slides Dev Web》 03. Laravel
Record) • Migrations • Moteur de templates (Blade) • Pagination • Authentification, sessions • Mail • Tests unitaires • Extensible par packages8 (bundles) via composer Le Front Controller Architecture MVC avec StyleCI11 • Editeurs et IDE : PhpStorm, glitch12, brackets, VS Code, repl.it13, Gitpod14… • Tests : unitaires, Jmeter, Selenium, … • Outils : devtools Chrome ou FF, Emmet15, git • Doc 8http://packalyst0 码力 | 8 页 | 224.34 KB | 1 年前3
共 14 条
- 1
- 2













