I use Spatie Laravel Data and maatwebsite Laravel Excel.
My test need use specific xlsx file stored inside my tests folder. I've seen a lot of test used fake files but I can't use one because it's special template.
I try to create test to upload…
I am using Spatie Package Skelton to develop a package. It is using pest under the hood.
I created a .env.testing file and checked the environment used while running a pest test with dd(app()->environment));, which is testing.
Anyhow, when I use…
I'm using Laravel, Pest for my tests and Mockery for mocking. I have a simple action that looks like so:
public function handle(): array
{
$sites = [];
$envDir = dirname(__FILE__, 3).'/env';
$envFiles = File::glob($envDir.'/.env.*');
…
I am very new to testing with PEST and I want to create tests, that required to create a new Client from a factory. The Client must have a permission for what I am using Spatie Permissions.
The issue I have is that have the roles and permissions…
I'm currently using a package that logs activity via listening for model events based on changes made to them (create/update/delete). The code functions as expected locally though when it comes to writing feature tests, logging deletions fails.…
I'm writing a grammar parser for my config evaluation library using pest parser. The grammar supports and, or, matches, == operators to create complex queries. For e.g.
Input: "foo: when bar == 'apple' and baz matches 'foobaz'"
Precedence of "==",…
I tried to group together two cases to reduce code duplication in the grammar:
From
string = _{("'" ~ (string_value) ~ "'") | ("\"" ~ (string_value) ~ "\"") | ("\"" ~ (string_value_escape_1) ~ "\"") | ("'" ~ (string_value_escape_2) ~ "'")}
…
I am trying to build a basic Latex parser using pest library. For the moment, I only care about lines, bold format and plain text. I am struggling with the latter. To simplify the problem, I assume that it cannot contain these two chars: \, }.
lines…
I am attempting to add Pest and unit tests to a Nova Admin/Laravel application.
I want to test that a page exists, but I don't want to have to deal with whether or not the user is authenticated as an admin to view the page. I am trying to test that…
I'm writing an integration/feature test in Laravel 9 (using Pest) in which I create an Address that's associated to an existing customer. My customers' data live under a view that is created via migration:
return new class extends Migration
{
…
I am wanting to execute a simple test using Pest and using Orcestra Testbench Dusk. However when this happens, I encounter the following in the browser:
This page isn’t working
127.0.0.1 is currently unable to handle this request.
HTTP ERROR…
I have an application using laravel 8 that runs on laravel sail.
When I launch the tests with the command
sail artisan test
I noticed something strange. The config() function of laravel was getting the wrong value, meanwhile, the env() function…
I'm learning pest parser written in Rust and I need to parse a file:
{ISomething as Something, IOther as Other}
I wrote a rule:
LBrace = { "{" }
RBrace = { "}" }
Comma = { "," }
As = { "as" }
symbolAliases = { LBrace ~ importAliases ~ ( Comma ~…
I am building a Solidity parser with Rust. I am using the Pest Parser crate and am setting up my grammar.pest file to be very similar to the Solidity repo's Lexer/Parser.
I am hitting two errors. The first is an error saying:
|
…