profile
viewpoint
Alex Martin AlexMartinFR @sicesi Berry, France http://instagram.com/AlexMartinFR 🎨 Holistic Devsigner · Fond of good UX and pretty tools

pestphp/pest 1700

Pest is an elegant PHP Testing Framework with a focus on simplicity

AlexMartinFR/mojave-alfred-accented-themes 142

🎩 Dark & Light Accented Alfred Themes tailored for macOS Mojave & Catalina users.

pestphp/website 17

This repository contains Pest's website and documentation

AlexMartinFR/alfred-livewire-docs 13

An ultra-fast Laravel Livewire docs search workflow for Alfred.

AlexMartinFR/alfred-pestphp-docs 12

An ultra-fast Pest PHP docs search workflow for Alfred.

pestphp/pestphp.com 4

This repository contains Pest's website and documentation

pestphp/docs 2

The official documentation for Pest.

AlexMartinFR/laracolors 1

WIP - A light VSCode theme for those who love the Laravel documentation color theme.

AlexMartinFR/pest-plugin-trim 1

✂️ Trim down your Pest reporting by hiding passing tests

issue commenttighten/takeout

Group the services list by categories

You rock, Daniele!

I've added a custom visual improvement I wanted to add, feel free to implement or reject it :)

https://github.com/tighten/takeout/pull/135/files#r494363191

AlexMartinFR

comment created time in a month

Pull request review commenttighten/takeout

Group the services list by categories

 public function handle(): void             return;         } -        $option = $this->menu('Services to enable', $this->enableableServices())-            ->addLineBreak('', 1)-            ->setPadding(2, 5)-            ->open();+        $option = $this->menu('Services to enable:')->setTitleSeparator('=');++        foreach ($this->enableableServicesByCategory() as $category => $services) {+            $menuItems = collect($services)->mapWithKeys(function ($service) {+                return [$service['shortName'] => $service['name']];+            })->toArray();++            $option->addStaticItem("{$category}:")+                ->addStaticItem('---------')

Nice! Quick visual refinement suggestion:

Custom separator length for each category to Tighten (pun intended) everything up!

$separatorLength = strlen($category) + 1;
$separator = str_repeat('-', $separatorLength);

$option->addStaticItem("{$category}:")
    ->addStaticItem($separator)
    […]
danielebarbaro

comment created time in a month

PullRequestReviewEvent

issue commenttighten/takeout

Group the services list by categories

Grouping and iterating is the way to go IMHO 👍

I what I envision, each service should have a category property. Then, we'll only have to iterate through every categories to get the UI we want. (I'm basically describing your code snippet here.)

If you can brings categories to every service that I can then read to sort everything, that would be very welcome indeed! Thanks 😎

PS: That terminal preview is not just a mockup, it's actually a screenshot of a running hacked version of Takeout. I didn't need to tweak the nunomaduro/laravel-console-menu package to do so 🙂

image

AlexMartinFR

comment created time in a month

issue commenttighten/takeout

Group the services list by categories

As soon as Takeout integrate a categories concept for its services, I'll gladly leverage it to submit that PR 🙂

I've tried to add the concept of categories to the core of Takeout, but I am not comfortable enough with the codebase. I hope someone else will be able to contribute that!

AlexMartinFR

comment created time in a month

startedtighten/lambo

started time in a month

issue commentpestphp/pest

Website: Move from Jigsaw to a Laravel App

I can't remember if I already said that, but I feel it's important to keep an easy way for people to contribute to the documentation!

The fact that it's currently as easy as submitting a GitHub PR is a huge plus. That's how I got involved in Pest in the first place. 🙂

octoper

comment created time in a month

issue commentpestphp/pest

Website: Move from Jigsaw to a Laravel App

Long documentation pages would greatly benefit from a clickable Table of Contents. See Idea 1 in #90

This idea came back to the surface while re-reading the Expectation API page. It lacks an easy to browse overview of all available methods:

Pest Documentation - Expectations VS Laravel Documentation - Eloquent Collections - List of available methods

octoper

comment created time in 2 months

issue commentpestphp/pest

Add Pest plugin to documentation

Shootout to @octoper who is working in the dark to bring this to life! 👍

olivernybroe

comment created time in 2 months

startedblade-ui-kit/blade-ui-kit

started time in 2 months

issue commentpestphp/pest

Call to undefined function assert*

Thanks for that!

Synchro

comment created time in 2 months

issue commenttightenco/takeout

Group the services list by categories

Bear with me here, as this would need serious refactoring and is for now only generating the menu, but here is the raw idea:

public function handle(): void
{
    […]

    $databaseServices = [
        'mariadb' => 'MariaDB',
        'mysql' => 'MySQL',
        'mssql' => 'MS SQL'
    ];

    $searchServices = [
        'meilisearch' => 'MeiliSearch',
        'elasticsearch' => 'ElasticSearch'
    ];

    $option = $this->menu('Services to enable')->setTitleSeparator('=');

    /* displayCategory() private method */
    $option->addStaticItem('Database:')->addStaticItem('---------');

    foreach ($databaseServices as $service => $name) {
        $option->addOption($service, $name);
    }

    $option->addLineBreak('', 1);
    /* End of the displayCategory() private method */

    /* Start of the displayCategory() private method */
    $option->addStaticItem('Search:')->addStaticItem('-------');

    foreach ($searchServices as $service => $name) {
        $option->addOption($service, $name);
    }

    $option->addLineBreak('', 1);
    /* End of the displayCategory() private method */

    $option->setPadding(2, 5)->open();

    if (!$option) {
        return;
    }

    $this->enable($option);
}

Terminal preview:

image

AlexMartinFR

comment created time in 2 months

pull request commenttightenco/takeout

Add command to restart stopped containers and stop running containers

I'm all for this new command set 👍

takeout add
takeout remove
takeout start
takeout stop

It makes much more sense than the actual, whether or not one is familiar with Docker! That was the main pain point encountered during testing with a developer friend.

Thanks!

infernobass7

comment created time in 2 months

issue commenttightenco/takeout

Group the services list by categories

I think cli-menu's separators could be a good start:

image

Extra steps would only be necessary when the service list begins to be too long. The same way multi-steps forms are only relevant in some cases.

AlexMartinFR

comment created time in 2 months

issue openedtightenco/takeout

Group the services list by categories

Issue:

Takeout currently sorts the services list by alphabetical order. As more and more services will be added to the list, it might become a bit confusing to browse.

Suggestion:

Each service could have a category property, which could be used to at least group similar services.

Examples of categories:

  • database
  • storage
  • search
  • cache
  • mail

Improvement:

Thetakeout enable command could now have two steps instead of one:

  • Select a category of services
  • Choose the relevant service in the curated list

created time in 2 months

push eventAlexMartinFR/AlexMartinFR

Alex Martin

commit sha 0f641fdc02272894d3fe45623a7f89d7f8e7e038

New README.md

view details

push time in 2 months

startedbennettfeely/bennett

started time in 2 months

pull request commenttightenco/takeout

Command UI improvement proposal

WIP

I'm toying with something better to also sort services by category.

AlexMartinFR

comment created time in 2 months

push eventAlexMartinFR/takeout

Alex Martin

commit sha ad0ac80f670cb5913d03b59007b1efd0aa343a6c

New formatName() private method The formatName() method makes it possible to display the real name of a dependency in the terminal, instead of its class name.

view details

push time in 2 months

Pull request review commenttightenco/takeout

Command UI improvement proposal

 public function handle(): void     public function enableableServices(): array     {         return collect((new Services)->all())->mapWithKeys(function ($fqcn, $shortName) {-            return [$shortName => Str::afterLast($fqcn, '\\')];+            $fullName = Str::of($fqcn)->replace(['MsS', 'Sql'], ['MS S', 'SQL']);

Sure!

AlexMartinFR

comment created time in 2 months

PullRequestReviewEvent

push eventAlexMartinFR/takeout

Alex Martin

commit sha 50a5fa28e33c05537a8de078e60558c38ef2ccf0

Update DisableCommand The `exit` option is redondant with the `no` option, it can safely be removed here.

view details

push time in 2 months

issue closedAlexMartinFR/mojave-alfred-accented-themes

Catalina: The workflow you are trying to import is invalid.

Importing the workflow in alfred 4 throws error:

"The workflow you are trying to import is invalid."

closed time in 2 months

rbadapanda

PR opened tightenco/takeout

Command UI improvement proposal

Changes:

  • Official dependencies names displayed (Confusion between MsSql & MySql should now be avoided)
  • Line break to separate the exit menu item from the rest
  • Padding around the menu to help the text breathe

Preview:

image

Improvements:

I think the UI would be awesome with better padding around the menu item text.

+11 -4

0 comment

2 changed files

pr created time in 2 months

create barnchAlexMartinFR/takeout

branch : command-ui-polish

created branch time in 2 months

delete branch AlexMartinFR/takeout

delete branch : readme

delete time in 2 months

pull request commenttightenco/takeout

Update 🥡 README.md

Thanks 🙂

AlexMartinFR

comment created time in 2 months

Pull request review commenttightenco/takeout

Add command to restart stopped containers and stop running containers

+<?php++namespace App\Commands;++use App\InitializesCommands;+use App\Services;+use App\Shell\Docker;+use Illuminate\Support\Str;+use LaravelZero\Framework\Commands\Command;+use PhpSchool\CliMenu\CliMenu;++class StopCommand extends Command

If I may, my use case for stop:

  • I have an old MySQL container only needed when I work on legacy apps.
  • A stopped container doesn't consume RAM nor CPU so I can keep it around for a while.
  • It's easier to start a stopped container than to spin-up a new one and having to go through port, version & volume configuration again.
infernobass7

comment created time in 2 months

PullRequestReviewEvent

PR opened tightenco/takeout

Update 🥡 README.md
  • Adding a precision regarding the multiple MySQL containers example: they must not share the same volume
  • Fixed PostgreSQL spelling
+3 -3

0 comment

1 changed file

pr created time in 2 months

push eventAlexMartinFR/takeout

Alex Martin

commit sha 726ff6444b19ae54fa26285278406605e726247d

Update 🥡 README.md - Adding a precision regarding the multiple MySQL containers example: they must not share the same volume - Fixed PostgreSQL spelling

view details

push time in 2 months

create barnchAlexMartinFR/takeout

branch : readme

created branch time in 2 months

pull request commenttightenco/takeout

Add command to restart stopped containers and stop running containers

Good idea!

It would be worth offering all three start, stop & restart commands, in my opinion. I was expecting them and had to resort to native Docker commands instead 🙂

infernobass7

comment created time in 2 months

fork AlexMartinFR/takeout

Docker-based development-only dependency manager; pairs with Valet.

fork in 2 months

PR opened tightenco/takeout

Fix 🥡 README.md
  • Small typos fixed.
  • The takeout list table now better reflects what's effectively shown in the terminal.

Thanks for this awesome package! 🙂

+3 -3

0 comment

1 changed file

pr created time in 2 months

push eventAlexMartinFR/takeout

Alex Martin

commit sha b9ceccd427bf8d3e087853b827ce19ec066e5f3b

Fix 🥡 README.md Small typos fixed. Thanks for this awesome package! 🙏

view details

push time in 2 months

fork AlexMartinFR/takeout

Docker-based development-only dependency manager; pairs with Valet.

fork in 2 months

startedtightenco/takeout

started time in 2 months

issue commentAlexMartinFR/mojave-alfred-accented-themes

Catalina: The workflow you are trying to import is invalid.

If you can't install any workflow on your Alfred copy, I think you should contact the Alfred support first. Sorry for not being more helpful, I don't see what's wrong here.

Hope they'll be able to help you 🙂

rbadapanda

comment created time in 2 months

issue commentAlexMartinFR/mojave-alfred-accented-themes

Catalina: The workflow you are trying to import is invalid.

Hi!

Everything works fine here and on a clean install as well.

Let's try to solve your issue:

  • Please click this download link. Don't open it with Archive Utility or similar software, just download it straight to your computer.

  • You should end up with a Mojave-Themes-Switcher.alfredworkflow file in your download folder.

  • Double click it to install the workflow.

Feel free to take and post screenshots of the steps you took if this doesn't work 🙂

Thanks!

rbadapanda

comment created time in 2 months

issue commentowenvoke/blade-fontawesome

Add support for Font Awesome pro icons

Perfect solution, can't see any drawback 👍 Thanks for that!

owenvoke

comment created time in 2 months

push eventAlexMartinFR/AlexMartinFR

Alex Martin

commit sha c15373af340b15e0489601fde92ab7f8669ef012

updated README.md

view details

push time in 2 months

pull request commentpestphp/website

docs: add initial Drift guide

No rush! I'm just signaling the issue before I forget 🙃

Enjoy your holidays 👍

owenvoke

comment created time in 2 months

pull request commentpestphp/website

docs: add initial Drift guide

@nunomaduro Somehow, this is still not deployed after 20 minutes. Something might be stuck!

owenvoke

comment created time in 2 months

push eventpestphp/website

Owen Voke

commit sha ecca34bdd6f03ac88d35ca1c62bae9a17ea19643

docs: add initial Drift guide

view details

Owen Voke

commit sha 2a8bfdf4dc38ec6e41e80fe64d31498427028b7a

chore: re-order Drift documentation

view details

Owen Voke

commit sha cb39e35d44661215d813fa1cc4d080387ebad41d

docs: update Drift to come after PHPUnit

view details

Alex Martin

commit sha 9ce4fd5d50bbfa26fc968a8704a9f7cf36d1fcf5

Merge pull request #72 from owenvoke/feature/drift docs: add initial Drift guide

view details

push time in 2 months

PR merged pestphp/website

docs: add initial Drift guide documentation

This is a draft PR for adding documentation for Drift.

+65 -1

0 comment

3 changed files

owenvoke

pr closed time in 2 months

Pull request review commentpestphp/website

docs: add initial Drift guide

             'Symfony' => 'docs/guides/symfony',             'Pest From Scratch' => 'docs/guides/pest-from-scratch',             'Creating Plugins' => 'docs/guides/plugins',+            'Drift' => 'docs/guides/drift',

Perfect! I’ll merge it when I get back home 🙂

owenvoke

comment created time in 2 months

Pull request review commentpestphp/website

docs: add initial Drift guide

             'Symfony' => 'docs/guides/symfony',             'Pest From Scratch' => 'docs/guides/pest-from-scratch',             'Creating Plugins' => 'docs/guides/plugins',+            'Drift' => 'docs/guides/drift',

Thanks 👍

Hope I'm not pushing it, but I had another idea 🙃

I like your idea of putting Drift on the guide section. It would make even more sense if it was right after the PHPUnit guide.

Here is a transition that we could add:

[…] the test now contains only what really matters.

Wouldn't it be cool if you could automatically migrate your PHPUnit tests to Pest? We got you! In the next section, you will learn all about Drift, our experimental migration tool 🔥

Next section: Drift →

owenvoke

comment created time in 2 months

Pull request review commentpestphp/website

docs: add initial Drift guide

             'Symfony' => 'docs/guides/symfony',             'Pest From Scratch' => 'docs/guides/pest-from-scratch',             'Creating Plugins' => 'docs/guides/plugins',+            'Drift' => 'docs/guides/drift',

Can we move the Drift guide up one line?

The Creating Plugins guide makes for a nice transition to the Plugins section :)

owenvoke

comment created time in 2 months

issue commentAlexMartinFR/mojave-alfred-accented-themes

Toggle does not change MacOS color theme

I've installed the Big Sur open beta to work on that issue.

The aforementioned AppleScript doesn't work anymore, so I'll have to adapt it before using it.

pengzheng2

comment created time in 2 months

issue commentpestphp/pest

Add Pest plugin to documentation

Can we extract only the downloads number from the JetBrains website?

If so, we could have a custom design like so: (I would write a text introduction on top of the page, before throwing the cards).

image

I've reused a "dome badge" CSS class I'm using on my projects to make different logos fit better together. Also, the card is inspired by some TailwindUI components, and the download SVG is from Heroicons 👍

olivernybroe

comment created time in 2 months

pull request commentpestphp/website

Bump elliptic from 6.5.2 to 6.5.3

Good idea, let's have separate PRs 👍

dependabot[bot]

comment created time in 2 months

push eventpestphp/website

dependabot[bot]

commit sha d42221f020e477da64acb2585ac88f9842859303

Bump elliptic from 6.5.2 to 6.5.3 Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com>

view details

Alex Martin

commit sha e5f47495bc885fd17cc48b0675678431d253576c

Merge pull request #74 from pestphp/dependabot/npm_and_yarn/elliptic-6.5.3 Bump elliptic from 6.5.2 to 6.5.3

view details

push time in 2 months

PR merged pestphp/website

Bump elliptic from 6.5.2 to 6.5.3 dependencies

Bumps elliptic from 6.5.2 to 6.5.3. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/indutny/elliptic/commit/8647803dc3d90506aa03021737f7b061ba959ae1"><code>8647803</code></a> 6.5.3</li> <li><a href="https://github.com/indutny/elliptic/commit/856fe4d99fe7b6200556e6400b3bf585b1721bec"><code>856fe4d</code></a> signature: prevent malleability and overflows</li> <li>See full diff in <a href="https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+40 -9

4 comments

2 changed files

dependabot[bot]

pr closed time in 2 months

issue commentpestphp/pest

Add Pest plugin to documentation

Now that we have an official PHPStorm plugin, can we assume all issues listed here are solved?

If so, we could turn the PHPStorm guide into a broader IDE integration guide. We could also link @m1guelpf's https://github.com/m1guelpf/better-pest for VSCode users.

olivernybroe

comment created time in 3 months

issue commentpestphp/pest

Documentation / Guide: PHPStorm

Continuing on: https://github.com/pestphp/pest/issues/86

AlexMartinFR

comment created time in 3 months

pull request commentpestphp/website

Bump elliptic from 6.5.2 to 6.5.3

Do you have a preference, @octoper ?

dependabot[bot]

comment created time in 3 months

startedCodeception/Codeception

started time in 3 months

issue openedpestphp/pest

Main questions and arguments against Pest as the default Laravel testing tool.

Here is a summary of the main questions and arguments against Pest being the default Laravel testing tool:

Common questions:

  • Will PHPUnit still work?
  • Do I have to rewrite my PHPUnit tests?
  • Will there be breaking changes in the future forcing me to rewrite my tests?
  • Is there any large-size real world project using Pest yet?
  • What about edge cases? (I'm thinking of one which will be solved soon, the animation delay/CI compute time issue.)
  • Why should I make the switch? What problem does it solve?
  • Will Dusk, BrowserKit Testing & Orchestra also move to Pest?
  • Why switch to Pest and not to the 7 years old "atoum"?
  • Why does this PR removes PHPUnit from composer.json?
  • Why does it replaces default test to the Pest syntax?
  • What is Pest main advantage over PHPUnit?
  • What about IDE integration and ease of use?
  • Can the phpstorm/idea test runner run Pest tests?
  • Can I still get XML and coverage reports for my CI environment?

Arguments against it:

  • Pest is not old enough yet.
  • Pest is not stable enough yet.
  • Pest ecosystem is not mature enough yet.
  • Pest only offers PHPUnit features via a different syntax.
  • Pest adds mental overhead to devs switching to Laravel.
  • Pest forces devs experienced with PHPUnit to learn a new tool.
  • Pest doesn't have enough resources & educational content.
  • "Pest ****" will return less Google results than "PHPUnit ***".
  • Pest is not the defacto standard tool. PHPUnit is.
  • An hybrid test suite with both PHPUnit & Pest is not optimal.
  • Pest as the default wouldn't be good for PHPUnit's future.
  • Pest will fragment the testing community.
  • The syntax is only familiar if you’ve used tools like Mocha or Jest.
  • This is change for the sake of change.

Arguments in favor:

  • Pest is to PHPUnit what Laravel is to Symfony.
  • Pest saves me time debugging tests with the improved output.
  • The fluent syntax is easier to newcomers and feels more natural.
  • The data provider syntax is great.
  • Pest has great syntax, makes it easy to write tests.

Alternatives suggestions for now:

  • Make Pest a preset / optional scaffolding.
  • Mention Pest in the official documentation.

created time in 3 months

startedatoum/atoum

started time in 3 months

pull request commentpestphp/website

Bump elliptic from 6.5.2 to 6.5.3

I've come to the same conclusion not long ago, +1 for npm 👍

dependabot[bot]

comment created time in 3 months

pull request commentpestphp/pest

Update globals.php

I have read-only access on the Pest repo itself though 🙂

AlexMartinFR

comment created time in 3 months

delete branch AlexMartinFR/pest

delete branch : patch-2

delete time in 3 months

PR opened pestphp/pest

Update globals.php

Typo.

Q A
Bug fix? no
New feature? no
Fixed tickets

Just a typo.

+2 -2

0 comment

1 changed file

pr created time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha a51c354268e24a23fef44b3e811e5280b1381979

Update globals.php Typo.

view details

push time in 3 months

CommitCommentEvent

pull request commentpestphp/pest

New expectations: toHaveKeys() & toContainAll()

Sure!

AlexMartinFR

comment created time in 3 months

pull request commentpestphp/pest

New expectations: toHaveKeys() & toContainAll()

You are right @nunomaduro, not->toContainAll() is working correctly, thanks to the word all.

I should have mentioned the real issue, not->toHaveKeys():

test('not - fails when at least one key exists')
    ->expect(['a' => 1, 'b', 'c' => 'world'])
    ->not()->toHaveKeys(['hello', 'a'])
    ->throws(ExpectationFailedException::class);

    // An exception should be thrown for 'a'.
    // However it's not the case.

I've been scratching my head around this one and can't find a way to make it work as I intend.

I could rename the expectation to toHaveAllKeys(), so that it matches the actual behaviour, but it doesn't seem ideal.

AlexMartinFR

comment created time in 3 months

push eventAlexMartinFR/AlexMartinFR

Alex Martin

commit sha 422c912b96bc94e880d351e9a35589236d59f405

Update README.md

view details

push time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha 12f5fb806ce9fb27c3caae76909f59e9acab1ab5

Tests for the new expectations - WIP Tests for the new expectations. WIP, some tests aren't passing yet.

view details

push time in 3 months

pull request commentpestphp/pest

New expectations: toHaveKeys() & toContainAll()

Writing the tests made me stumble upon a logic pitfall with the not() modifier.

When all values that shouldn't be here exist, the expected exception is thrown:

test('not - fail when all strings exist')
    ->expect('Pest is awesome')
    ->not()->toContainAll(['Pest', 'awesome'])
    ->throws(ExpectationFailedException::class);
    // OK.

However, when only parts of the conditions are met, the exception is not thrown, and the test doesn't fail as it should:

test('not - fail when at least one string exists')
    ->expect('Pest is awesome')
    ->not()->toContainAll(['Pest', 'clever'])
    ->throws(ExpectationFailedException::class);
    // Should fail, but is passing.

The same problem is encountered with toHaveKeys.

I have no clue how to circle around that, any idea?

AlexMartinFR

comment created time in 3 months

Pull request review commentpestphp/pest

New expectations: toHaveKeys() & toContainAll()

 public function toHaveKey(string $key): Expectation         return $this;     } +    /**+     * Asserts that the value array has all of the provided $keys.+     *+     * @param array<mixed> $keys

Of course! Forgot about the tests, I'll get on it 😌

AlexMartinFR

comment created time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha c7c122dfd04625957f40f1f793435db79445b5d2

Update Expectation.php Fixed doc blocks: array{mixed} to array<mixed>

view details

push time in 3 months

pull request commentpestphp/pest

New expectations: toHaveKeys() & toContainAll()

I'm not familiar with doc blocks best practices yet.

I'll commit this change 👍

AlexMartinFR

comment created time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha 49377fd12cf5f798f1a94cdbe502b4b2c0674e1a

Update Expectation.php Fixed PHPDocs

view details

push time in 3 months

PR opened pestphp/pest

New expectations: toHaveKeys() & toContainAll()
Q A
Bug fix? no
New feature? yes
Fixed tickets -

Adds new expectations:

  • toHaveKeys(array $keys)
  • toContainAll(array $needles)

Inspired by Freek in a recent livestream: https://youtu.be/KXUVnu-fTIM?t=3625

+32 -0

0 comment

1 changed file

pr created time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha 3b2af5d881881bc803fc6f1551de7c00f7cb5092

New expectation: `toHaveKeys()` toHaveKeys(array $keys): Checks for multiple keys at once in the value array. Will only pass if all of the provided keys are present.

view details

Alex Martin

commit sha d25a1477b388e06cc55c38965b7e65c891892f12

New expectation: `toContainAll()` toContainAll(array $needles): Checks for multiple needles at once in the value. Will only pass if all of the provided needles are present.

view details

push time in 3 months

push eventAlexMartinFR/pest

Nuno Maduro

commit sha 19ce7332073896d459b6f9564eedc04003ef2b93

Merge pull request #139 from AlexMartinFR/expectations Polishing Expectation API

view details

push time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha 38ba892f96908a66716c222f68ce1b9a60256041

New expectation: `toHaveKeys()` Checks for multiple keys at once in the provided array. Will only pass if all keys are present.

view details

push time in 3 months

push eventAlexMartinFR/AlexMartinFR

Alex Martin

commit sha adbf8f5cbf4dd6b4379fd86cbdc5e9a913aae21c

Update README.md

view details

push time in 3 months

push eventAlexMartinFR/AlexMartinFR

Alex Martin

commit sha 1f1c6ea8afc2c1b6206fbc9a28372bfe14d8282d

Update README.md

view details

push time in 3 months

push eventAlexMartinFR/AlexMartinFR

Alex Martin

commit sha 70893ebea01f8f0a7b32edc4c37eb644c145f676

Update README.md

view details

push time in 3 months

pull request commentpestphp/pest

Polishing Expectation API

Thanks 🙂

AlexMartinFR

comment created time in 3 months

pull request commentpestphp/pest

Polishing Expectation.php

AlexMartinFR

comment created time in 3 months

delete branch AlexMartinFR/pest

delete branch : patch-1

delete time in 3 months

PR opened pestphp/pest

Polishing Expectation API
Q A
Bug fix? no
New feature? no
Fixed tickets -
  • Streamlined comments
  • Removed potential confusion between $value & $this->value: now we use $expected & $this->value
+65 -65

0 comment

1 changed file

pr created time in 3 months

PR closed pestphp/pest

Polishing Expectation.php
Q A
Bug fix? no
New feature? no
Fixed tickets -
  • Streamlined comments.
  • Removed potential confusion between $value & $this->value: now we use $expected & $this->value.
+65 -65

3 comments

1 changed file

AlexMartinFR

pr closed time in 3 months

pull request commentpestphp/pest

Polishing Expectation.php

Thanks for trying, I'll submit another PR with the proper file, it should be easier 👍

AlexMartinFR

comment created time in 3 months

create barnchAlexMartinFR/pest

branch : expectations

created branch time in 3 months

issue commentpestphp/pest

[Website] Twitter preview image is broken on the website installation docs

Broken, as in it always displays the same image?

nunomaduro

comment created time in 3 months

pull request commentpestphp/pest

Polishing Expectation.php

While reviewing the Expectation API for the documentation, I spotted some potential improvements to make it more readable.

However, I have some PHPStan errors I can't seem to get rid of! Any clue about that?

(At first I forgot to update the PHPDoc, but now it's fixed and the tests still fail)

AlexMartinFR

comment created time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha 4f0b3a575dfccd3c3d2e36eba493a8c0baca4fa7

Update Expectation.php Fixed PHPDocs.

view details

push time in 3 months

PR opened pestphp/pest

Polishing Expectation.php
Q A
Bug fix? no
New feature? no
Fixed tickets -
  • Streamlined comments.
  • Removed potential confusion between $value & $this->value: now we use $expected & $this->value.
+56 -56

0 comment

1 changed file

pr created time in 3 months

push eventAlexMartinFR/pest

Alex Martin

commit sha 095d5d9f43007add9fc1bf6e9411af7f65f34749

Update Expectation.php - Streamlined comments. - Removed potential confusion between `$value` & `$this->value`: now we use `$expected` & `$this->value`.

view details

push time in 3 months

push eventpestphp/website

Alex Martin

commit sha 5bca9f069b0e6a0fbff851bae7fa6a2685b5db12

Update navigation.php

view details

push time in 3 months

push eventpestphp/website

Alex Martin

commit sha 65e3c39149a2a96ea3293168c3914dc2d777b0f5

Update assertions.md

view details

push time in 3 months

fork AlexMartinFR/pest

Pest is an elegant PHP Testing Framework with a focus on simplicity

https://pestphp.com

fork in 3 months

push eventpestphp/website

Alex Martin

commit sha 688f9ea3d14f5184233dbe94b1f0b5104e431c0f

Update expectations.md Fixed the assertion example, added `$this->`.

view details

push time in 3 months

pull request commentpestphp/website

Adds Expectation documentation

I've just merged the documentation, we can always improve it later. But I think I might have hit the trigger too soon.

Should I wait until Pest 0.3 is released? @nunomaduro

AlexMartinFR

comment created time in 3 months

push eventpestphp/website

Alex Martin

commit sha 15ba4aff695b7a55ed173cb33762e2132dfbdb75

Update expectations.md Typo

view details

push time in 3 months

more