Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6
- name: Setup git
run: |
git config user.email "pusher-ci@pusher.com"
Expand All @@ -24,12 +24,12 @@ jobs:
export TAG=$(head -1 CHANGELOG.tmp | cut -d' ' -f2)
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2.6.1
with:
tag_name: ${{ env.TAG }}
release_name: ${{ env.TAG }}
name: ${{ env.TAG }}
body_path: CHANGELOG.tmp
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
export NEW_VERSION=$(semver bump ${{ env.RELEASE }} $CURRENT)
echo "VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Setup git
run: |
git config user.email "pusher-ci@pusher.com"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ on:
branches: [ master, main ]
jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
php: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} Test

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Run unit tests
run: composer exec phpunit tests/unit

- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
repository: pusher/public_actions
path: .github/actions
Expand Down
7 changes: 3 additions & 4 deletions tests/acceptance/MiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,17 @@ protected function setUp(): void
PUSHERAPP_AUTHKEY, PUSHERAPP_SECRET and
PUSHERAPP_APPID keys.');
} else {
$stack = new HandlerStack();
$stack->setHandler(new CurlHandler());
$stack = HandlerStack::create(new CurlHandler());
$stack->push($this->increment());
$client = new Client(['handler' => $stack]);
$this->pusher = new Pusher(PUSHERAPP_AUTHKEY, PUSHERAPP_SECRET, PUSHERAPP_APPID, ['cluster' => PUSHERAPP_CLUSTER], $client);
}
}

public function testStringPush(): void
public function testEventPush(): void
{
self::assertEquals(0, $this->count);
$result = $this->pusher->trigger('test_channel', 'my_event', 'Test string');
$result = $this->pusher->trigger('test_channel', 'my_event', ['message' => 'Test string']);
self::assertEquals(1, $this->count);
}
}
4 changes: 2 additions & 2 deletions tests/acceptance/SendToUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ protected function setUp(): void

public function testSendToUser(): void
{
$result = $this->pusher->sendToUser('123', 'my_event', 'Test string');
$result = $this->pusher->sendToUser('123', 'my_event', ['message' => 'Test string']);
self::assertEquals(new stdClass(), $result);
}

public function testSendToUserAsync(): void
{
$result = $this->pusher->sendToUserAsync('123', 'my_event', 'Test string')->wait();
$result = $this->pusher->sendToUserAsync('123', 'my_event', ['message' => 'Test string'])->wait();
self::assertEquals(new stdClass(), $result);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/TriggerAsyncTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public function testObjectConstruct(): void
self::assertNotNull($this->pusher, 'Created new \Pusher\Pusher object');
}

public function testStringPush(): void
public function testEventPush(): void
{
$result = $this->pusher->triggerAsync('test_channel', 'my_event', 'Test string')->wait();
$result = $this->pusher->triggerAsync('test_channel', 'my_event', ['message' => 'Test string'])->wait();
self::assertEquals(new stdClass(), $result);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/TriggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public function testObjectConstruct(): void
self::assertNotNull($this->pusher, 'Created new \Pusher\Pusher object');
}

public function testStringPush(): void
public function testEventPush(): void
{
$result = $this->pusher->trigger('test_channel', 'my_event', 'Test string');
$result = $this->pusher->trigger('test_channel', 'my_event', ['message' => 'Test string']);
self::assertEquals(new stdClass(), $result);
}

Expand Down